All Fqsen (for search Ctrl+F) frame | noframe

namespace Doctrine

namespace Doctrine\Common

namespace Doctrine\Common\Cache

class Doctrine\Common\Cache::CacheProvider

Base class for cache provider implementations.

classconstant string Doctrine\Common\Cache\CacheProvider::DOCTRINE_NAMESPACE_CACHEKEY

classconstant string Doctrine\Common\Cache\CacheProvider::STATS_HITS

classconstant string Doctrine\Common\Cache\CacheProvider::STATS_MISSES

classconstant string Doctrine\Common\Cache\CacheProvider::STATS_UPTIME

classconstant string Doctrine\Common\Cache\CacheProvider::STATS_MEMORY_USAGE

classconstant string Doctrine\Common\Cache\CacheProvider::STATS_MEMORY_AVAILABLE

classconstant string Doctrine\Common\Cache\CacheProvider::STATS_MEMORY_AVAILIABLE

Only for backward compatibility (may be removed in next major release)

method Doctrine\Common\Cache\CacheProvider::setNamespace ($namespace) : void

Sets the namespace to prefix all cache ids with.

method Doctrine\Common\Cache\CacheProvider::getNamespace () : string

Retrieves the namespace that prefixes all cache ids.

method Doctrine\Common\Cache\CacheProvider::fetch ($id) : mixed

Fetches an entry from the cache.

method Doctrine\Common\Cache\CacheProvider::fetchMultiple ($keys) : mixed[]

Returns an associative array of values for keys is found in cache.

method Doctrine\Common\Cache\CacheProvider::saveMultiple ($keysAndValues, $lifetime = 0) : bool

Returns a boolean value indicating if the operation succeeded.

method Doctrine\Common\Cache\CacheProvider::contains ($id) : bool

Tests if an entry exists in the cache.

method Doctrine\Common\Cache\CacheProvider::save ($id, $data, $lifeTime = 0) : bool

Puts data into the cache.

If a cache entry with the given id already exists, its data will be replaced.

method Doctrine\Common\Cache\CacheProvider::deleteMultiple ($keys) : bool

Deletes several cache entries.

method Doctrine\Common\Cache\CacheProvider::delete ($id) : bool

Deletes a cache entry.

method Doctrine\Common\Cache\CacheProvider::getStats () : arraynull

Retrieves cached information from the data store.

The server's statistics array has the following values:

method Doctrine\Common\Cache\CacheProvider::flushAll () : bool

Flushes all cache entries, globally.

method Doctrine\Common\Cache\CacheProvider::deleteAll () : bool

Deletes all cache entries in the current cache namespace.

method Doctrine\Common\Cache\CacheProvider::doFetchMultiple ($keys) : array

Default implementation of doFetchMultiple. Each driver that supports multi-get should owerwrite it.

method Doctrine\Common\Cache\CacheProvider::doFetch ($id) : mixedfalse

Fetches an entry from the cache.

method Doctrine\Common\Cache\CacheProvider::doContains ($id) : bool

Tests if an entry exists in the cache.

method Doctrine\Common\Cache\CacheProvider::doSaveMultiple ($keysAndValues, $lifetime = 0) : bool

Default implementation of doSaveMultiple. Each driver that supports multi-put should override it.

method Doctrine\Common\Cache\CacheProvider::doSave ($id, $data, $lifeTime = 0) : bool

Puts data into the cache.

method Doctrine\Common\Cache\CacheProvider::doDeleteMultiple ($keys) : bool

Default implementation of doDeleteMultiple. Each driver that supports multi-delete should override it.

method Doctrine\Common\Cache\CacheProvider::doDelete ($id) : bool

Deletes a cache entry.

method Doctrine\Common\Cache\CacheProvider::doFlush () : bool

Flushes all cache entries.

method Doctrine\Common\Cache\CacheProvider::doGetStats () : arraynull

Retrieves cached information from the data store.

class Doctrine\Common\Cache::ArrayCache

Array cache driver.

classconstant string Doctrine\Common\Cache\ArrayCache::DOCTRINE_NAMESPACE_CACHEKEY

classconstant string Doctrine\Common\Cache\ArrayCache::STATS_HITS

classconstant string Doctrine\Common\Cache\ArrayCache::STATS_MISSES

classconstant string Doctrine\Common\Cache\ArrayCache::STATS_UPTIME

classconstant string Doctrine\Common\Cache\ArrayCache::STATS_MEMORY_USAGE

classconstant string Doctrine\Common\Cache\ArrayCache::STATS_MEMORY_AVAILABLE

classconstant string Doctrine\Common\Cache\ArrayCache::STATS_MEMORY_AVAILIABLE

Only for backward compatibility (may be removed in next major release)

method Doctrine\Common\Cache\ArrayCache::__construct () : void

method Doctrine\Common\Cache\ArrayCache::doFetch ($id) : mixedfalse

Fetches an entry from the cache.

method Doctrine\Common\Cache\ArrayCache::doContains ($id) : bool

Tests if an entry exists in the cache.

method Doctrine\Common\Cache\ArrayCache::doSave ($id, $data, $lifeTime = 0) : bool

Puts data into the cache.

method Doctrine\Common\Cache\ArrayCache::doDelete ($id) : bool

Deletes a cache entry.

method Doctrine\Common\Cache\ArrayCache::doFlush () : bool

Flushes all cache entries.

method Doctrine\Common\Cache\ArrayCache::doGetStats () : arraynull

Retrieves cached information from the data store.

method Doctrine\Common\Cache\ArrayCache::setNamespace ($namespace) : void

Sets the namespace to prefix all cache ids with.

method Doctrine\Common\Cache\ArrayCache::getNamespace () : string

Retrieves the namespace that prefixes all cache ids.

method Doctrine\Common\Cache\ArrayCache::fetch ($id) : mixed

Fetches an entry from the cache.

method Doctrine\Common\Cache\ArrayCache::fetchMultiple ($keys) : mixed[]

Returns an associative array of values for keys is found in cache.

method Doctrine\Common\Cache\ArrayCache::saveMultiple ($keysAndValues, $lifetime = 0) : bool

Returns a boolean value indicating if the operation succeeded.

method Doctrine\Common\Cache\ArrayCache::contains ($id) : bool

Tests if an entry exists in the cache.

method Doctrine\Common\Cache\ArrayCache::save ($id, $data, $lifeTime = 0) : bool

Puts data into the cache.

If a cache entry with the given id already exists, its data will be replaced.

method Doctrine\Common\Cache\ArrayCache::deleteMultiple ($keys) : bool

Deletes several cache entries.

method Doctrine\Common\Cache\ArrayCache::delete ($id) : bool

Deletes a cache entry.

method Doctrine\Common\Cache\ArrayCache::getStats () : arraynull

Retrieves cached information from the data store.

The server's statistics array has the following values:

method Doctrine\Common\Cache\ArrayCache::flushAll () : bool

Flushes all cache entries, globally.

method Doctrine\Common\Cache\ArrayCache::deleteAll () : bool

Deletes all cache entries in the current cache namespace.

method Doctrine\Common\Cache\ArrayCache::doFetchMultiple ($keys) : array

Default implementation of doFetchMultiple. Each driver that supports multi-get should owerwrite it.

method Doctrine\Common\Cache\ArrayCache::doSaveMultiple ($keysAndValues, $lifetime = 0) : bool

Default implementation of doSaveMultiple. Each driver that supports multi-put should override it.

method Doctrine\Common\Cache\ArrayCache::doDeleteMultiple ($keys) : bool

Default implementation of doDeleteMultiple. Each driver that supports multi-delete should override it.

interface Doctrine\Common\Cache::Cache

Interface for cache drivers.

classconstant string Doctrine\Common\Cache\Cache::STATS_HITS

classconstant string Doctrine\Common\Cache\Cache::STATS_MISSES

classconstant string Doctrine\Common\Cache\Cache::STATS_UPTIME

classconstant string Doctrine\Common\Cache\Cache::STATS_MEMORY_USAGE

classconstant string Doctrine\Common\Cache\Cache::STATS_MEMORY_AVAILABLE

classconstant string Doctrine\Common\Cache\Cache::STATS_MEMORY_AVAILIABLE

Only for backward compatibility (may be removed in next major release)

method Doctrine\Common\Cache\Cache::fetch ($id) : mixed

Fetches an entry from the cache.

method Doctrine\Common\Cache\Cache::contains ($id) : bool

Tests if an entry exists in the cache.

method Doctrine\Common\Cache\Cache::save ($id, $data, $lifeTime = 0) : bool

Puts data into the cache.

If a cache entry with the given id already exists, its data will be replaced.

method Doctrine\Common\Cache\Cache::delete ($id) : bool

Deletes a cache entry.

method Doctrine\Common\Cache\Cache::getStats () : arraynull

Retrieves cached information from the data store.

The server's statistics array has the following values:

interface Doctrine\Common\Cache::FlushableCache

Interface for cache that can be flushed.

method Doctrine\Common\Cache\FlushableCache::flushAll () : bool

Flushes all cache entries, globally.

interface Doctrine\Common\Cache::ClearableCache

Interface for cache that can be flushed.

Intended to be used for partial clearing of a cache namespace. For a more
global "flushing", see Doctrine\Common\Cache\FlushableCache.

method Doctrine\Common\Cache\ClearableCache::deleteAll () : bool

Deletes all cache entries in the current cache namespace.

interface Doctrine\Common\Cache::MultiOperationCache

Interface for cache drivers that supports multiple items manipulation.

method Doctrine\Common\Cache\MultiOperationCache::fetchMultiple ($keys) : mixed[]

Returns an associative array of values for keys is found in cache.

method Doctrine\Common\Cache\MultiOperationCache::deleteMultiple ($keys) : bool

Deletes several cache entries.

method Doctrine\Common\Cache\MultiOperationCache::saveMultiple ($keysAndValues, $lifetime = 0) : bool

Returns a boolean value indicating if the operation succeeded.

interface Doctrine\Common\Cache::MultiGetCache

Interface for cache drivers that allows to get many items at once.

method Doctrine\Common\Cache\MultiGetCache::fetchMultiple ($keys) : mixed[]

Returns an associative array of values for keys is found in cache.

interface Doctrine\Common\Cache::MultiDeleteCache

Interface for cache drivers that allows to put many items at once.

method Doctrine\Common\Cache\MultiDeleteCache::deleteMultiple ($keys) : bool

Deletes several cache entries.

interface Doctrine\Common\Cache::MultiPutCache

Interface for cache drivers that allows to put many items at once.

method Doctrine\Common\Cache\MultiPutCache::saveMultiple ($keysAndValues, $lifetime = 0) : bool

Returns a boolean value indicating if the operation succeeded.

class Doctrine\Common::EventManager

The EventManager is the central point of Doctrine's event listener system.
Listeners are registered on the manager and events are dispatched through the
manager.

method Doctrine\Common\EventManager::dispatchEvent ($eventName, $eventArgs = null) : void

Dispatches an event to all registered listeners.

method Doctrine\Common\EventManager::getListeners ($event = null) : object[]object[][]

Gets the listeners of a specific event or all listeners.

method Doctrine\Common\EventManager::hasListeners ($event) : bool

Checks whether an event has any registered listeners.

method Doctrine\Common\EventManager::addEventListener ($events, $listener) : void

Adds an event listener that listens on the specified events.

method Doctrine\Common\EventManager::removeEventListener ($events, $listener) : void

Removes an event listener from the specified events.

method Doctrine\Common\EventManager::addEventSubscriber ($subscriber) : void

Adds an EventSubscriber. The subscriber is asked for all the events it is
interested in and added as a listener for these events.

method Doctrine\Common\EventManager::removeEventSubscriber ($subscriber) : void

Removes an EventSubscriber. The subscriber is asked for all the events it is
interested in and removed as a listener for these events.

class Doctrine\Common::EventArgs

EventArgs is the base class for classes containing event data.

This class contains no event data. It is used by events that do not pass state
information to an event handler when an event is raised. The single empty EventArgs
instance can be obtained through getEmptyInstance.

method Doctrine\Common\EventArgs::getEmptyInstance () : Doctrine\Common\EventArgs

Gets the single, empty and immutable EventArgs instance.

This instance will be used when events are dispatched without any parameter,
like this: EventManager::dispatchEvent('eventname');

The benefit from this is that only one empty instance is instantiated and shared
(otherwise there would be instances for every dispatched in the abovementioned form).

interface Doctrine\Common::EventSubscriber

An EventSubscriber knows himself what events he is interested in.
If an EventSubscriber is added to an EventManager, the manager invokes
getSubscribedEvents and registers the subscriber as a listener for all
returned events.

method Doctrine\Common\EventSubscriber::getSubscribedEvents () : string[]

Returns an array of events this subscriber wants to listen to.

namespace Doctrine\DBAL

namespace Doctrine\DBAL\Cache

class Doctrine\DBAL\Cache::ArrayStatement

method Doctrine\DBAL\Cache\ArrayStatement::__construct ($data) : void

method Doctrine\DBAL\Cache\ArrayStatement::closeCursor () : bool

Closes the cursor, enabling the statement to be executed again.

method Doctrine\DBAL\Cache\ArrayStatement::columnCount () : int

Returns the number of columns in the result set

method Doctrine\DBAL\Cache\ArrayStatement::setFetchMode ($fetchMode, $arg2 = null, $arg3 = null) : bool

Sets the fetch mode to use while iterating this statement.

method Doctrine\DBAL\Cache\ArrayStatement::getIterator () : void

method Doctrine\DBAL\Cache\ArrayStatement::fetch ($fetchMode = null, $cursorOrientation = PDO::FETCH_ORI_NEXT, $cursorOffset = 0) : mixed

Returns the next row of a result set.

method Doctrine\DBAL\Cache\ArrayStatement::fetchAll ($fetchMode = null, $fetchArgument = null, $ctorArgs = null) : mixed[]

Returns an array containing all of the result set rows.

method Doctrine\DBAL\Cache\ArrayStatement::fetchColumn ($columnIndex = 0) : mixedfalse

Returns a single column from the next row of a result set or FALSE if there are no more rows.

class Doctrine\DBAL\Cache::CacheException

property string Doctrine\DBAL\Cache\CacheException::message

property integer Doctrine\DBAL\Cache\CacheException::code

property NULL Doctrine\DBAL\Cache\CacheException::file

property NULL Doctrine\DBAL\Cache\CacheException::line

method Doctrine\DBAL\Cache\CacheException::noCacheKey () : Doctrine\DBAL\Cache\CacheException

method Doctrine\DBAL\Cache\CacheException::noResultDriverConfigured () : Doctrine\DBAL\Cache\CacheException

method Doctrine\DBAL\Cache\CacheException::notSupported ($method) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Cache\CacheException::invalidPlatformSpecified () : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Cache\CacheException::invalidPlatformType ($invalidPlatform) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Cache\CacheException::invalidPlatformVersionSpecified ($version, $expectedFormat) : Doctrine\DBAL\DBALException

Returns a new instance for an invalid specified platform version.

method Doctrine\DBAL\Cache\CacheException::invalidPdoInstance () : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Cache\CacheException::driverRequired ($url = null) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Cache\CacheException::unknownDriver ($unknownDriverName, $knownDrivers) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Cache\CacheException::driverExceptionDuringQuery ($driver, $driverEx, $sql, $params = []) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Cache\CacheException::driverException ($driver, $driverEx) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Cache\CacheException::invalidWrapperClass ($wrapperClass) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Cache\CacheException::invalidDriverClass ($driverClass) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Cache\CacheException::invalidTableName ($tableName) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Cache\CacheException::noColumnsSpecifiedForTable ($tableName) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Cache\CacheException::limitOffsetInvalid () : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Cache\CacheException::typeExists ($name) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Cache\CacheException::unknownColumnType ($name) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Cache\CacheException::typeNotFound ($name) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Cache\CacheException::typeNotRegistered ($type) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Cache\CacheException::typeAlreadyRegistered ($type) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Cache\CacheException::__construct ($message, $code, $previous) : void

method Doctrine\DBAL\Cache\CacheException::__wakeup () : void

method Doctrine\DBAL\Cache\CacheException::getMessage () : void

method Doctrine\DBAL\Cache\CacheException::getCode () : void

method Doctrine\DBAL\Cache\CacheException::getFile () : void

method Doctrine\DBAL\Cache\CacheException::getLine () : void

method Doctrine\DBAL\Cache\CacheException::getTrace () : void

method Doctrine\DBAL\Cache\CacheException::getPrevious () : void

method Doctrine\DBAL\Cache\CacheException::getTraceAsString () : void

method Doctrine\DBAL\Cache\CacheException::__toString () : void

class Doctrine\DBAL\Cache::QueryCacheProfile

Query Cache Profile handles the data relevant for query caching.

It is a value object, setter methods return NEW instances.

method Doctrine\DBAL\Cache\QueryCacheProfile::__construct ($lifetime = 0, $cacheKey = null, $resultCache = null) : void

method Doctrine\DBAL\Cache\QueryCacheProfile::getResultCacheDriver () : Doctrine\Common\Cache\Cachenull

method Doctrine\DBAL\Cache\QueryCacheProfile::getLifetime () : int

method Doctrine\DBAL\Cache\QueryCacheProfile::getCacheKey () : string

method Doctrine\DBAL\Cache\QueryCacheProfile::generateCacheKeys ($query, $params, $types, $connectionParams = []) : string[]

Generates the real cache key from query, params, types and connection parameters.

method Doctrine\DBAL\Cache\QueryCacheProfile::setResultCacheDriver ($cache) : Doctrine\DBAL\Cache\QueryCacheProfile

method Doctrine\DBAL\Cache\QueryCacheProfile::setCacheKey ($cacheKey) : Doctrine\DBAL\Cache\QueryCacheProfile

method Doctrine\DBAL\Cache\QueryCacheProfile::setLifetime ($lifetime) : Doctrine\DBAL\Cache\QueryCacheProfile

class Doctrine\DBAL\Cache::ResultCacheStatement

Cache statement for SQL results.

A result is saved in multiple cache keys, there is the originally specified
cache key which is just pointing to result rows by key. The following things
have to be ensured:

  1. lifetime of the original key has to be longer than that of all the individual rows keys
  2. if any one row key is missing the query has to be re-executed.

Also you have to realize that the cache will load the whole result into memory at once to ensure 2.
This means that the memory usage for cached results might increase by using this feature.

method Doctrine\DBAL\Cache\ResultCacheStatement::__construct ($stmt, $resultCache, $cacheKey, $realKey, $lifetime) : void

method Doctrine\DBAL\Cache\ResultCacheStatement::closeCursor () : bool

Closes the cursor, enabling the statement to be executed again.

method Doctrine\DBAL\Cache\ResultCacheStatement::columnCount () : int

Returns the number of columns in the result set

method Doctrine\DBAL\Cache\ResultCacheStatement::setFetchMode ($fetchMode, $arg2 = null, $arg3 = null) : bool

Sets the fetch mode to use while iterating this statement.

method Doctrine\DBAL\Cache\ResultCacheStatement::getIterator () : void

method Doctrine\DBAL\Cache\ResultCacheStatement::fetch ($fetchMode = null, $cursorOrientation = PDO::FETCH_ORI_NEXT, $cursorOffset = 0) : mixed

Returns the next row of a result set.

method Doctrine\DBAL\Cache\ResultCacheStatement::fetchAll ($fetchMode = null, $fetchArgument = null, $ctorArgs = null) : mixed[]

Returns an array containing all of the result set rows.

method Doctrine\DBAL\Cache\ResultCacheStatement::fetchColumn ($columnIndex = 0) : mixedfalse

Returns a single column from the next row of a result set or FALSE if there are no more rows.

method Doctrine\DBAL\Cache\ResultCacheStatement::rowCount () : int

Returns the number of rows affected by the last DELETE, INSERT, or UPDATE statement
executed by the corresponding object.

If the last SQL statement executed by the associated Statement object was a SELECT statement,
some databases may return the number of rows returned by that statement. However,
this behaviour is not guaranteed for all databases and should not be
relied on for portable applications.

namespace Doctrine\DBAL\Driver

namespace Doctrine\DBAL\Driver\AbstractOracleDriver

class Doctrine\DBAL\Driver\AbstractOracleDriver::EasyConnectString

Represents an Oracle Easy Connect string

method Doctrine\DBAL\Driver\AbstractOracleDriver\EasyConnectString::__toString () : string

method Doctrine\DBAL\Driver\AbstractOracleDriver\EasyConnectString::fromArray ($params) : Doctrine\DBAL\Driver\AbstractOracleDriver\EasyConnectString

Creates the object from an array representation

method Doctrine\DBAL\Driver\AbstractOracleDriver\EasyConnectString::fromConnectionParameters ($params) : Doctrine\DBAL\Driver\AbstractOracleDriver\EasyConnectString

Creates the object from the given DBAL connection parameters.

namespace Doctrine\DBAL\Driver\DrizzlePDOMySql

class Doctrine\DBAL\Driver\DrizzlePDOMySql::Driver

Drizzle driver using PDO MySql.

method Doctrine\DBAL\Driver\DrizzlePDOMySql\Driver::connect ($params, $username = null, $password = null, $driverOptions = []) : Doctrine\DBAL\Driver\Connection

Attempts to create a connection with the database.

The usage of NULL to indicate empty username or password is deprecated. Use an empty string instead.

method Doctrine\DBAL\Driver\DrizzlePDOMySql\Driver::createDatabasePlatformForVersion ($version) : Doctrine\DBAL\Platforms\AbstractPlatform

Factory method for creating the appropriate platform instance for the given version.

method Doctrine\DBAL\Driver\DrizzlePDOMySql\Driver::getDatabasePlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

Gets the DatabasePlatform instance that provides all the metadata about
the platform this driver connects to.

method Doctrine\DBAL\Driver\DrizzlePDOMySql\Driver::getSchemaManager ($conn) : Doctrine\DBAL\Schema\AbstractSchemaManager

Gets the SchemaManager that can be used to inspect and change the underlying
database schema of the platform this driver connects to.

method Doctrine\DBAL\Driver\DrizzlePDOMySql\Driver::getName () : string

Gets the name of the driver.

method Doctrine\DBAL\Driver\DrizzlePDOMySql\Driver::constructPdoDsn ($params) : string

Constructs the MySql PDO DSN.

method Doctrine\DBAL\Driver\DrizzlePDOMySql\Driver::convertException ($message, $exception) : Doctrine\DBAL\Exception\DriverException

Converts a given DBAL driver exception into a standardized DBAL driver exception.

It evaluates the vendor specific error code and SQLSTATE and transforms
it into a unified Doctrine\DBAL\Exception\DriverException subclass.

method Doctrine\DBAL\Driver\DrizzlePDOMySql\Driver::getDatabase ($conn) : string

Gets the name of the database connected to for this driver.

namespace Doctrine\DBAL\Driver\IBMDB2

class Doctrine\DBAL\Driver\IBMDB2::DB2Driver

IBM DB2 Driver.

method Doctrine\DBAL\Driver\IBMDB2\DB2Driver::connect ($params, $username = null, $password = null, $driverOptions = []) : Doctrine\DBAL\Driver\Connection

Attempts to create a connection with the database.

The usage of NULL to indicate empty username or password is deprecated. Use an empty string instead.

method Doctrine\DBAL\Driver\IBMDB2\DB2Driver::getName () : string

Gets the name of the driver.

method Doctrine\DBAL\Driver\IBMDB2\DB2Driver::getDatabase ($conn) : string

Gets the name of the database connected to for this driver.

method Doctrine\DBAL\Driver\IBMDB2\DB2Driver::getDatabasePlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

Gets the DatabasePlatform instance that provides all the metadata about
the platform this driver connects to.

method Doctrine\DBAL\Driver\IBMDB2\DB2Driver::getSchemaManager ($conn) : Doctrine\DBAL\Schema\AbstractSchemaManager

Gets the SchemaManager that can be used to inspect and change the underlying
database schema of the platform this driver connects to.

namespace Doctrine\DBAL\Driver\Mysqli

class Doctrine\DBAL\Driver\Mysqli::Driver

method Doctrine\DBAL\Driver\Mysqli\Driver::connect ($params, $username = null, $password = null, $driverOptions = []) : Doctrine\DBAL\Driver\Connection

Attempts to create a connection with the database.

The usage of NULL to indicate empty username or password is deprecated. Use an empty string instead.

method Doctrine\DBAL\Driver\Mysqli\Driver::getName () : string

Gets the name of the driver.

method Doctrine\DBAL\Driver\Mysqli\Driver::convertException ($message, $exception) : Doctrine\DBAL\Exception\DriverException

Converts a given DBAL driver exception into a standardized DBAL driver exception.

It evaluates the vendor specific error code and SQLSTATE and transforms
it into a unified Doctrine\DBAL\Exception\DriverException subclass.

method Doctrine\DBAL\Driver\Mysqli\Driver::createDatabasePlatformForVersion ($version) : Doctrine\DBAL\Platforms\AbstractPlatform

Factory method for creating the appropriate platform instance for the given version.

method Doctrine\DBAL\Driver\Mysqli\Driver::getDatabase ($conn) : string

Gets the name of the database connected to for this driver.

method Doctrine\DBAL\Driver\Mysqli\Driver::getDatabasePlatform () : Doctrine\DBAL\Platforms\MySqlPlatform

Gets the DatabasePlatform instance that provides all the metadata about
the platform this driver connects to.

method Doctrine\DBAL\Driver\Mysqli\Driver::getSchemaManager ($conn) : Doctrine\DBAL\Schema\MySqlSchemaManager

Gets the SchemaManager that can be used to inspect and change the underlying
database schema of the platform this driver connects to.

namespace Doctrine\DBAL\Driver\OCI8

class Doctrine\DBAL\Driver\OCI8::Driver

A Doctrine DBAL driver for the Oracle OCI8 PHP extensions.

method Doctrine\DBAL\Driver\OCI8\Driver::connect ($params, $username = null, $password = null, $driverOptions = []) : Doctrine\DBAL\Driver\Connection

Attempts to create a connection with the database.

The usage of NULL to indicate empty username or password is deprecated. Use an empty string instead.

method Doctrine\DBAL\Driver\OCI8\Driver::_constructDsn ($params) : string

Constructs the Oracle DSN.

method Doctrine\DBAL\Driver\OCI8\Driver::getName () : string

Gets the name of the driver.

method Doctrine\DBAL\Driver\OCI8\Driver::convertException ($message, $exception) : Doctrine\DBAL\Exception\DriverException

Converts a given DBAL driver exception into a standardized DBAL driver exception.

It evaluates the vendor specific error code and SQLSTATE and transforms
it into a unified Doctrine\DBAL\Exception\DriverException subclass.

method Doctrine\DBAL\Driver\OCI8\Driver::getDatabase ($conn) : string

Gets the name of the database connected to for this driver.

method Doctrine\DBAL\Driver\OCI8\Driver::getDatabasePlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

Gets the DatabasePlatform instance that provides all the metadata about
the platform this driver connects to.

method Doctrine\DBAL\Driver\OCI8\Driver::getSchemaManager ($conn) : Doctrine\DBAL\Schema\AbstractSchemaManager

Gets the SchemaManager that can be used to inspect and change the underlying
database schema of the platform this driver connects to.

method Doctrine\DBAL\Driver\OCI8\Driver::getEasyConnectString ($params) : string

Returns an appropriate Easy Connect String for the given parameters.

namespace Doctrine\DBAL\Driver\PDOMySql

class Doctrine\DBAL\Driver\PDOMySql::Driver

PDO MySql driver.

method Doctrine\DBAL\Driver\PDOMySql\Driver::connect ($params, $username = null, $password = null, $driverOptions = []) : Doctrine\DBAL\Driver\Connection

Attempts to create a connection with the database.

The usage of NULL to indicate empty username or password is deprecated. Use an empty string instead.

method Doctrine\DBAL\Driver\PDOMySql\Driver::constructPdoDsn ($params) : string

Constructs the MySql PDO DSN.

method Doctrine\DBAL\Driver\PDOMySql\Driver::getName () : string

Gets the name of the driver.

method Doctrine\DBAL\Driver\PDOMySql\Driver::convertException ($message, $exception) : Doctrine\DBAL\Exception\DriverException

Converts a given DBAL driver exception into a standardized DBAL driver exception.

It evaluates the vendor specific error code and SQLSTATE and transforms
it into a unified Doctrine\DBAL\Exception\DriverException subclass.

method Doctrine\DBAL\Driver\PDOMySql\Driver::createDatabasePlatformForVersion ($version) : Doctrine\DBAL\Platforms\AbstractPlatform

Factory method for creating the appropriate platform instance for the given version.

method Doctrine\DBAL\Driver\PDOMySql\Driver::getDatabase ($conn) : string

Gets the name of the database connected to for this driver.

method Doctrine\DBAL\Driver\PDOMySql\Driver::getDatabasePlatform () : Doctrine\DBAL\Platforms\MySqlPlatform

Gets the DatabasePlatform instance that provides all the metadata about
the platform this driver connects to.

method Doctrine\DBAL\Driver\PDOMySql\Driver::getSchemaManager ($conn) : Doctrine\DBAL\Schema\MySqlSchemaManager

Gets the SchemaManager that can be used to inspect and change the underlying
database schema of the platform this driver connects to.

namespace Doctrine\DBAL\Driver\PDOOracle

class Doctrine\DBAL\Driver\PDOOracle::Driver

PDO Oracle driver.

WARNING: This driver gives us segfaults in our testsuites on CLOB and other
stuff. PDO Oracle is not maintained by Oracle or anyone in the PHP community,
which leads us to the recommendation to use the "oci8" driver to connect
to Oracle instead.

method Doctrine\DBAL\Driver\PDOOracle\Driver::connect ($params, $username = null, $password = null, $driverOptions = []) : Doctrine\DBAL\Driver\Connection

Attempts to create a connection with the database.

The usage of NULL to indicate empty username or password is deprecated. Use an empty string instead.

method Doctrine\DBAL\Driver\PDOOracle\Driver::getName () : string

Gets the name of the driver.

method Doctrine\DBAL\Driver\PDOOracle\Driver::convertException ($message, $exception) : Doctrine\DBAL\Exception\DriverException

Converts a given DBAL driver exception into a standardized DBAL driver exception.

It evaluates the vendor specific error code and SQLSTATE and transforms
it into a unified Doctrine\DBAL\Exception\DriverException subclass.

method Doctrine\DBAL\Driver\PDOOracle\Driver::getDatabase ($conn) : string

Gets the name of the database connected to for this driver.

method Doctrine\DBAL\Driver\PDOOracle\Driver::getDatabasePlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

Gets the DatabasePlatform instance that provides all the metadata about
the platform this driver connects to.

method Doctrine\DBAL\Driver\PDOOracle\Driver::getSchemaManager ($conn) : Doctrine\DBAL\Schema\AbstractSchemaManager

Gets the SchemaManager that can be used to inspect and change the underlying
database schema of the platform this driver connects to.

method Doctrine\DBAL\Driver\PDOOracle\Driver::getEasyConnectString ($params) : string

Returns an appropriate Easy Connect String for the given parameters.

namespace Doctrine\DBAL\Driver\PDOPgSql

class Doctrine\DBAL\Driver\PDOPgSql::Driver

Driver that connects through pdo_pgsql.

method Doctrine\DBAL\Driver\PDOPgSql\Driver::connect ($params, $username = null, $password = null, $driverOptions = []) : Doctrine\DBAL\Driver\Connection

Attempts to create a connection with the database.

The usage of NULL to indicate empty username or password is deprecated. Use an empty string instead.

method Doctrine\DBAL\Driver\PDOPgSql\Driver::getName () : string

Gets the name of the driver.

method Doctrine\DBAL\Driver\PDOPgSql\Driver::convertException ($message, $exception) : Doctrine\DBAL\Exception\DriverException

Converts a given DBAL driver exception into a standardized DBAL driver exception.

It evaluates the vendor specific error code and SQLSTATE and transforms
it into a unified Doctrine\DBAL\Exception\DriverException subclass.

method Doctrine\DBAL\Driver\PDOPgSql\Driver::createDatabasePlatformForVersion ($version) : Doctrine\DBAL\Platforms\AbstractPlatform

Factory method for creating the appropriate platform instance for the given version.

method Doctrine\DBAL\Driver\PDOPgSql\Driver::getDatabase ($conn) : string

Gets the name of the database connected to for this driver.

method Doctrine\DBAL\Driver\PDOPgSql\Driver::getDatabasePlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

Gets the DatabasePlatform instance that provides all the metadata about
the platform this driver connects to.

method Doctrine\DBAL\Driver\PDOPgSql\Driver::getSchemaManager ($conn) : Doctrine\DBAL\Schema\AbstractSchemaManager

Gets the SchemaManager that can be used to inspect and change the underlying
database schema of the platform this driver connects to.

namespace Doctrine\DBAL\Driver\PDOSqlite

class Doctrine\DBAL\Driver\PDOSqlite::Driver

The PDO Sqlite driver.

property mixed[] Doctrine\DBAL\Driver\PDOSqlite\Driver::_userDefinedFunctions

method Doctrine\DBAL\Driver\PDOSqlite\Driver::connect ($params, $username = null, $password = null, $driverOptions = []) : Doctrine\DBAL\Driver\Connection

Attempts to create a connection with the database.

The usage of NULL to indicate empty username or password is deprecated. Use an empty string instead.

method Doctrine\DBAL\Driver\PDOSqlite\Driver::_constructPdoDsn ($params) : string

Constructs the Sqlite PDO DSN.

method Doctrine\DBAL\Driver\PDOSqlite\Driver::getName () : string

Gets the name of the driver.

method Doctrine\DBAL\Driver\PDOSqlite\Driver::convertException ($message, $exception) : Doctrine\DBAL\Exception\DriverException

Converts a given DBAL driver exception into a standardized DBAL driver exception.

It evaluates the vendor specific error code and SQLSTATE and transforms
it into a unified Doctrine\DBAL\Exception\DriverException subclass.

method Doctrine\DBAL\Driver\PDOSqlite\Driver::getDatabase ($conn) : string

Gets the name of the database connected to for this driver.

method Doctrine\DBAL\Driver\PDOSqlite\Driver::getDatabasePlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

Gets the DatabasePlatform instance that provides all the metadata about
the platform this driver connects to.

method Doctrine\DBAL\Driver\PDOSqlite\Driver::getSchemaManager ($conn) : Doctrine\DBAL\Schema\AbstractSchemaManager

Gets the SchemaManager that can be used to inspect and change the underlying
database schema of the platform this driver connects to.

namespace Doctrine\DBAL\Driver\PDOSqlsrv

class Doctrine\DBAL\Driver\PDOSqlsrv::Driver

The PDO-based Sqlsrv driver.

method Doctrine\DBAL\Driver\PDOSqlsrv\Driver::connect ($params, $username = null, $password = null, $driverOptions = []) : Doctrine\DBAL\Driver\Connection

Attempts to create a connection with the database.

The usage of NULL to indicate empty username or password is deprecated. Use an empty string instead.

method Doctrine\DBAL\Driver\PDOSqlsrv\Driver::getName () : string

Gets the name of the driver.

method Doctrine\DBAL\Driver\PDOSqlsrv\Driver::createDatabasePlatformForVersion ($version) : Doctrine\DBAL\Platforms\AbstractPlatform

Factory method for creating the appropriate platform instance for the given version.

method Doctrine\DBAL\Driver\PDOSqlsrv\Driver::getDatabase ($conn) : string

Gets the name of the database connected to for this driver.

method Doctrine\DBAL\Driver\PDOSqlsrv\Driver::getDatabasePlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

Gets the DatabasePlatform instance that provides all the metadata about
the platform this driver connects to.

method Doctrine\DBAL\Driver\PDOSqlsrv\Driver::getSchemaManager ($conn) : Doctrine\DBAL\Schema\AbstractSchemaManager

Gets the SchemaManager that can be used to inspect and change the underlying
database schema of the platform this driver connects to.

namespace Doctrine\DBAL\Driver\SQLAnywhere

class Doctrine\DBAL\Driver\SQLAnywhere::Driver

A Doctrine DBAL driver for the SAP Sybase SQL Anywhere PHP extension.

method Doctrine\DBAL\Driver\SQLAnywhere\Driver::connect ($params, $username = null, $password = null, $driverOptions = []) : Doctrine\DBAL\Driver\Connection

Attempts to create a connection with the database.

The usage of NULL to indicate empty username or password is deprecated. Use an empty string instead.

method Doctrine\DBAL\Driver\SQLAnywhere\Driver::getName () : string

Gets the name of the driver.

method Doctrine\DBAL\Driver\SQLAnywhere\Driver::convertException ($message, $exception) : Doctrine\DBAL\Exception\DriverException

Converts a given DBAL driver exception into a standardized DBAL driver exception.

It evaluates the vendor specific error code and SQLSTATE and transforms
it into a unified Doctrine\DBAL\Exception\DriverException subclass.

method Doctrine\DBAL\Driver\SQLAnywhere\Driver::createDatabasePlatformForVersion ($version) : Doctrine\DBAL\Platforms\AbstractPlatform

Factory method for creating the appropriate platform instance for the given version.

method Doctrine\DBAL\Driver\SQLAnywhere\Driver::getDatabase ($conn) : string

Gets the name of the database connected to for this driver.

method Doctrine\DBAL\Driver\SQLAnywhere\Driver::getDatabasePlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

Gets the DatabasePlatform instance that provides all the metadata about
the platform this driver connects to.

method Doctrine\DBAL\Driver\SQLAnywhere\Driver::getSchemaManager ($conn) : Doctrine\DBAL\Schema\AbstractSchemaManager

Gets the SchemaManager that can be used to inspect and change the underlying
database schema of the platform this driver connects to.

namespace Doctrine\DBAL\Driver\SQLSrv

class Doctrine\DBAL\Driver\SQLSrv::Driver

Driver for ext/sqlsrv.

method Doctrine\DBAL\Driver\SQLSrv\Driver::connect ($params, $username = null, $password = null, $driverOptions = []) : Doctrine\DBAL\Driver\Connection

Attempts to create a connection with the database.

The usage of NULL to indicate empty username or password is deprecated. Use an empty string instead.

method Doctrine\DBAL\Driver\SQLSrv\Driver::getName () : string

Gets the name of the driver.

method Doctrine\DBAL\Driver\SQLSrv\Driver::createDatabasePlatformForVersion ($version) : Doctrine\DBAL\Platforms\AbstractPlatform

Factory method for creating the appropriate platform instance for the given version.

method Doctrine\DBAL\Driver\SQLSrv\Driver::getDatabase ($conn) : string

Gets the name of the database connected to for this driver.

method Doctrine\DBAL\Driver\SQLSrv\Driver::getDatabasePlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

Gets the DatabasePlatform instance that provides all the metadata about
the platform this driver connects to.

method Doctrine\DBAL\Driver\SQLSrv\Driver::getSchemaManager ($conn) : Doctrine\DBAL\Schema\AbstractSchemaManager

Gets the SchemaManager that can be used to inspect and change the underlying
database schema of the platform this driver connects to.

class Doctrine\DBAL\Driver::AbstractMySQLDriver

Abstract base implementation of the Doctrine\DBAL\Driver interface for MySQL based drivers.

method Doctrine\DBAL\Driver\AbstractMySQLDriver::convertException ($message, $exception) : Doctrine\DBAL\Exception\DriverException

Converts a given DBAL driver exception into a standardized DBAL driver exception.

It evaluates the vendor specific error code and SQLSTATE and transforms
it into a unified Doctrine\DBAL\Exception\DriverException subclass.

method Doctrine\DBAL\Driver\AbstractMySQLDriver::createDatabasePlatformForVersion ($version) : Doctrine\DBAL\Platforms\AbstractPlatform

Factory method for creating the appropriate platform instance for the given version.

method Doctrine\DBAL\Driver\AbstractMySQLDriver::getDatabase ($conn) : string

Gets the name of the database connected to for this driver.

method Doctrine\DBAL\Driver\AbstractMySQLDriver::getDatabasePlatform () : Doctrine\DBAL\Platforms\MySqlPlatform

Gets the DatabasePlatform instance that provides all the metadata about
the platform this driver connects to.

method Doctrine\DBAL\Driver\AbstractMySQLDriver::getSchemaManager ($conn) : Doctrine\DBAL\Schema\MySqlSchemaManager

Gets the SchemaManager that can be used to inspect and change the underlying
database schema of the platform this driver connects to.

method Doctrine\DBAL\Driver\AbstractMySQLDriver::connect ($params, $username = null, $password = null, $driverOptions = []) : Doctrine\DBAL\Driver\Connection

Attempts to create a connection with the database.

The usage of NULL to indicate empty username or password is deprecated. Use an empty string instead.

method Doctrine\DBAL\Driver\AbstractMySQLDriver::getName () : string

Gets the name of the driver.

class Doctrine\DBAL\Driver::AbstractDB2Driver

Abstract base implementation of the Doctrine\DBAL\Driver interface for IBM DB2 based drivers.

method Doctrine\DBAL\Driver\AbstractDB2Driver::getDatabase ($conn) : string

Gets the name of the database connected to for this driver.

method Doctrine\DBAL\Driver\AbstractDB2Driver::getDatabasePlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

Gets the DatabasePlatform instance that provides all the metadata about
the platform this driver connects to.

method Doctrine\DBAL\Driver\AbstractDB2Driver::getSchemaManager ($conn) : Doctrine\DBAL\Schema\AbstractSchemaManager

Gets the SchemaManager that can be used to inspect and change the underlying
database schema of the platform this driver connects to.

method Doctrine\DBAL\Driver\AbstractDB2Driver::connect ($params, $username = null, $password = null, $driverOptions = []) : Doctrine\DBAL\Driver\Connection

Attempts to create a connection with the database.

The usage of NULL to indicate empty username or password is deprecated. Use an empty string instead.

method Doctrine\DBAL\Driver\AbstractDB2Driver::getName () : string

Gets the name of the driver.

class Doctrine\DBAL\Driver::AbstractOracleDriver

Abstract base implementation of the Doctrine\DBAL\Driver interface for Oracle based drivers.

method Doctrine\DBAL\Driver\AbstractOracleDriver::convertException ($message, $exception) : Doctrine\DBAL\Exception\DriverException

Converts a given DBAL driver exception into a standardized DBAL driver exception.

It evaluates the vendor specific error code and SQLSTATE and transforms
it into a unified Doctrine\DBAL\Exception\DriverException subclass.

method Doctrine\DBAL\Driver\AbstractOracleDriver::getDatabase ($conn) : string

Gets the name of the database connected to for this driver.

method Doctrine\DBAL\Driver\AbstractOracleDriver::getDatabasePlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

Gets the DatabasePlatform instance that provides all the metadata about
the platform this driver connects to.

method Doctrine\DBAL\Driver\AbstractOracleDriver::getSchemaManager ($conn) : Doctrine\DBAL\Schema\AbstractSchemaManager

Gets the SchemaManager that can be used to inspect and change the underlying
database schema of the platform this driver connects to.

method Doctrine\DBAL\Driver\AbstractOracleDriver::getEasyConnectString ($params) : string

Returns an appropriate Easy Connect String for the given parameters.

method Doctrine\DBAL\Driver\AbstractOracleDriver::connect ($params, $username = null, $password = null, $driverOptions = []) : Doctrine\DBAL\Driver\Connection

Attempts to create a connection with the database.

The usage of NULL to indicate empty username or password is deprecated. Use an empty string instead.

method Doctrine\DBAL\Driver\AbstractOracleDriver::getName () : string

Gets the name of the driver.

class Doctrine\DBAL\Driver::PDOConnection

PDO implementation of the Connection interface.
Used by all PDO-based drivers.

classconstant integer Doctrine\DBAL\Driver\PDOConnection::PARAM_BOOL

classconstant integer Doctrine\DBAL\Driver\PDOConnection::PARAM_NULL

classconstant integer Doctrine\DBAL\Driver\PDOConnection::PARAM_INT

classconstant integer Doctrine\DBAL\Driver\PDOConnection::PARAM_STR

classconstant integer Doctrine\DBAL\Driver\PDOConnection::PARAM_LOB

classconstant integer Doctrine\DBAL\Driver\PDOConnection::PARAM_STMT

classconstant integer Doctrine\DBAL\Driver\PDOConnection::PARAM_INPUT_OUTPUT

classconstant integer Doctrine\DBAL\Driver\PDOConnection::PARAM_STR_NATL

classconstant integer Doctrine\DBAL\Driver\PDOConnection::PARAM_STR_CHAR

classconstant integer Doctrine\DBAL\Driver\PDOConnection::PARAM_EVT_ALLOC

classconstant integer Doctrine\DBAL\Driver\PDOConnection::PARAM_EVT_FREE

classconstant integer Doctrine\DBAL\Driver\PDOConnection::PARAM_EVT_EXEC_PRE

classconstant integer Doctrine\DBAL\Driver\PDOConnection::PARAM_EVT_EXEC_POST

classconstant integer Doctrine\DBAL\Driver\PDOConnection::PARAM_EVT_FETCH_PRE

classconstant integer Doctrine\DBAL\Driver\PDOConnection::PARAM_EVT_FETCH_POST

classconstant integer Doctrine\DBAL\Driver\PDOConnection::PARAM_EVT_NORMALIZE

classconstant integer Doctrine\DBAL\Driver\PDOConnection::FETCH_LAZY

classconstant integer Doctrine\DBAL\Driver\PDOConnection::FETCH_ASSOC

classconstant integer Doctrine\DBAL\Driver\PDOConnection::FETCH_NUM

classconstant integer Doctrine\DBAL\Driver\PDOConnection::FETCH_BOTH

classconstant integer Doctrine\DBAL\Driver\PDOConnection::FETCH_OBJ

classconstant integer Doctrine\DBAL\Driver\PDOConnection::FETCH_BOUND

classconstant integer Doctrine\DBAL\Driver\PDOConnection::FETCH_COLUMN

classconstant integer Doctrine\DBAL\Driver\PDOConnection::FETCH_CLASS

classconstant integer Doctrine\DBAL\Driver\PDOConnection::FETCH_INTO

classconstant integer Doctrine\DBAL\Driver\PDOConnection::FETCH_FUNC

classconstant integer Doctrine\DBAL\Driver\PDOConnection::FETCH_GROUP

classconstant integer Doctrine\DBAL\Driver\PDOConnection::FETCH_UNIQUE

classconstant integer Doctrine\DBAL\Driver\PDOConnection::FETCH_KEY_PAIR

classconstant integer Doctrine\DBAL\Driver\PDOConnection::FETCH_CLASSTYPE

classconstant integer Doctrine\DBAL\Driver\PDOConnection::FETCH_SERIALIZE

classconstant integer Doctrine\DBAL\Driver\PDOConnection::FETCH_PROPS_LATE

classconstant integer Doctrine\DBAL\Driver\PDOConnection::FETCH_NAMED

classconstant integer Doctrine\DBAL\Driver\PDOConnection::ATTR_AUTOCOMMIT

classconstant integer Doctrine\DBAL\Driver\PDOConnection::ATTR_PREFETCH

classconstant integer Doctrine\DBAL\Driver\PDOConnection::ATTR_TIMEOUT

classconstant integer Doctrine\DBAL\Driver\PDOConnection::ATTR_ERRMODE

classconstant integer Doctrine\DBAL\Driver\PDOConnection::ATTR_SERVER_VERSION

classconstant integer Doctrine\DBAL\Driver\PDOConnection::ATTR_CLIENT_VERSION

classconstant integer Doctrine\DBAL\Driver\PDOConnection::ATTR_SERVER_INFO

classconstant integer Doctrine\DBAL\Driver\PDOConnection::ATTR_CONNECTION_STATUS

classconstant integer Doctrine\DBAL\Driver\PDOConnection::ATTR_CASE

classconstant integer Doctrine\DBAL\Driver\PDOConnection::ATTR_CURSOR_NAME

classconstant integer Doctrine\DBAL\Driver\PDOConnection::ATTR_CURSOR

classconstant integer Doctrine\DBAL\Driver\PDOConnection::ATTR_ORACLE_NULLS

classconstant integer Doctrine\DBAL\Driver\PDOConnection::ATTR_PERSISTENT

classconstant integer Doctrine\DBAL\Driver\PDOConnection::ATTR_STATEMENT_CLASS

classconstant integer Doctrine\DBAL\Driver\PDOConnection::ATTR_FETCH_TABLE_NAMES

classconstant integer Doctrine\DBAL\Driver\PDOConnection::ATTR_FETCH_CATALOG_NAMES

classconstant integer Doctrine\DBAL\Driver\PDOConnection::ATTR_DRIVER_NAME

classconstant integer Doctrine\DBAL\Driver\PDOConnection::ATTR_STRINGIFY_FETCHES

classconstant integer Doctrine\DBAL\Driver\PDOConnection::ATTR_MAX_COLUMN_LEN

classconstant integer Doctrine\DBAL\Driver\PDOConnection::ATTR_EMULATE_PREPARES

classconstant integer Doctrine\DBAL\Driver\PDOConnection::ATTR_DEFAULT_FETCH_MODE

classconstant integer Doctrine\DBAL\Driver\PDOConnection::ATTR_DEFAULT_STR_PARAM

classconstant integer Doctrine\DBAL\Driver\PDOConnection::ERRMODE_SILENT

classconstant integer Doctrine\DBAL\Driver\PDOConnection::ERRMODE_WARNING

classconstant integer Doctrine\DBAL\Driver\PDOConnection::ERRMODE_EXCEPTION

classconstant integer Doctrine\DBAL\Driver\PDOConnection::CASE_NATURAL

classconstant integer Doctrine\DBAL\Driver\PDOConnection::CASE_LOWER

classconstant integer Doctrine\DBAL\Driver\PDOConnection::CASE_UPPER

classconstant integer Doctrine\DBAL\Driver\PDOConnection::NULL_NATURAL

classconstant integer Doctrine\DBAL\Driver\PDOConnection::NULL_EMPTY_STRING

classconstant integer Doctrine\DBAL\Driver\PDOConnection::NULL_TO_STRING

classconstant string Doctrine\DBAL\Driver\PDOConnection::ERR_NONE

classconstant integer Doctrine\DBAL\Driver\PDOConnection::FETCH_ORI_NEXT

classconstant integer Doctrine\DBAL\Driver\PDOConnection::FETCH_ORI_PRIOR

classconstant integer Doctrine\DBAL\Driver\PDOConnection::FETCH_ORI_FIRST

classconstant integer Doctrine\DBAL\Driver\PDOConnection::FETCH_ORI_LAST

classconstant integer Doctrine\DBAL\Driver\PDOConnection::FETCH_ORI_ABS

classconstant integer Doctrine\DBAL\Driver\PDOConnection::FETCH_ORI_REL

classconstant integer Doctrine\DBAL\Driver\PDOConnection::CURSOR_FWDONLY

classconstant integer Doctrine\DBAL\Driver\PDOConnection::CURSOR_SCROLL

classconstant integer Doctrine\DBAL\Driver\PDOConnection::MYSQL_ATTR_USE_BUFFERED_QUERY

classconstant integer Doctrine\DBAL\Driver\PDOConnection::MYSQL_ATTR_LOCAL_INFILE

classconstant integer Doctrine\DBAL\Driver\PDOConnection::MYSQL_ATTR_INIT_COMMAND

classconstant integer Doctrine\DBAL\Driver\PDOConnection::MYSQL_ATTR_COMPRESS

classconstant integer Doctrine\DBAL\Driver\PDOConnection::MYSQL_ATTR_DIRECT_QUERY

classconstant integer Doctrine\DBAL\Driver\PDOConnection::MYSQL_ATTR_FOUND_ROWS

classconstant integer Doctrine\DBAL\Driver\PDOConnection::MYSQL_ATTR_IGNORE_SPACE

classconstant integer Doctrine\DBAL\Driver\PDOConnection::MYSQL_ATTR_SSL_KEY

classconstant integer Doctrine\DBAL\Driver\PDOConnection::MYSQL_ATTR_SSL_CERT

classconstant integer Doctrine\DBAL\Driver\PDOConnection::MYSQL_ATTR_SSL_CA

classconstant integer Doctrine\DBAL\Driver\PDOConnection::MYSQL_ATTR_SSL_CAPATH

classconstant integer Doctrine\DBAL\Driver\PDOConnection::MYSQL_ATTR_SSL_CIPHER

classconstant integer Doctrine\DBAL\Driver\PDOConnection::MYSQL_ATTR_SERVER_PUBLIC_KEY

classconstant integer Doctrine\DBAL\Driver\PDOConnection::MYSQL_ATTR_MULTI_STATEMENTS

classconstant integer Doctrine\DBAL\Driver\PDOConnection::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT

classconstant integer Doctrine\DBAL\Driver\PDOConnection::PGSQL_ATTR_DISABLE_PREPARES

classconstant integer Doctrine\DBAL\Driver\PDOConnection::PGSQL_TRANSACTION_IDLE

classconstant integer Doctrine\DBAL\Driver\PDOConnection::PGSQL_TRANSACTION_ACTIVE

classconstant integer Doctrine\DBAL\Driver\PDOConnection::PGSQL_TRANSACTION_INTRANS

classconstant integer Doctrine\DBAL\Driver\PDOConnection::PGSQL_TRANSACTION_INERROR

classconstant integer Doctrine\DBAL\Driver\PDOConnection::PGSQL_TRANSACTION_UNKNOWN

classconstant integer Doctrine\DBAL\Driver\PDOConnection::SQLITE_DETERMINISTIC

method Doctrine\DBAL\Driver\PDOConnection::__construct ($dsn, $user = null, $password = null, $options = null) : void

method Doctrine\DBAL\Driver\PDOConnection::exec ($statement) : int

Executes an SQL statement and return the number of affected rows.

method Doctrine\DBAL\Driver\PDOConnection::getServerVersion () : string

Returns the version number of the database server connected to.

method Doctrine\DBAL\Driver\PDOConnection::prepare ($prepareString, $driverOptions = []) : Doctrine\DBAL\Driver\Statement

Prepares a statement for execution and returns a Statement object.

method Doctrine\DBAL\Driver\PDOConnection::query () : Doctrine\DBAL\Driver\Statement

Executes an SQL statement, returning a result set as a Statement object.

method Doctrine\DBAL\Driver\PDOConnection::quote ($input, $type = Doctrine\DBAL\ParameterType::STRING) : mixed

Quotes a string for use in a query.

method Doctrine\DBAL\Driver\PDOConnection::lastInsertId ($name = null) : string

Returns the ID of the last inserted row or sequence value.

method Doctrine\DBAL\Driver\PDOConnection::requiresQueryForServerVersion () : bool

Checks whether a query is required to retrieve the database server version.

method Doctrine\DBAL\Driver\PDOConnection::beginTransaction () : bool

Initiates a transaction.

method Doctrine\DBAL\Driver\PDOConnection::commit () : bool

Commits a transaction.

method Doctrine\DBAL\Driver\PDOConnection::rollBack () : bool

Rolls back the current transaction, as initiated by beginTransaction().

method Doctrine\DBAL\Driver\PDOConnection::inTransaction () : void

method Doctrine\DBAL\Driver\PDOConnection::setAttribute ($attribute, $value) : void

method Doctrine\DBAL\Driver\PDOConnection::errorCode () : stringnull

Returns the error code associated with the last operation on the database handle.

method Doctrine\DBAL\Driver\PDOConnection::errorInfo () : mixed[]

Returns extended error information associated with the last operation on the database handle.

method Doctrine\DBAL\Driver\PDOConnection::getAttribute ($attribute) : void

method Doctrine\DBAL\Driver\PDOConnection::__wakeup () : void

method Doctrine\DBAL\Driver\PDOConnection::__sleep () : void

method Doctrine\DBAL\Driver\PDOConnection::getAvailableDrivers () : void

class Doctrine\DBAL\Driver::AbstractPostgreSQLDriver

Abstract base implementation of the Doctrine\DBAL\Driver interface for PostgreSQL based drivers.

method Doctrine\DBAL\Driver\AbstractPostgreSQLDriver::convertException ($message, $exception) : Doctrine\DBAL\Exception\DriverException

Converts a given DBAL driver exception into a standardized DBAL driver exception.

It evaluates the vendor specific error code and SQLSTATE and transforms
it into a unified Doctrine\DBAL\Exception\DriverException subclass.

method Doctrine\DBAL\Driver\AbstractPostgreSQLDriver::createDatabasePlatformForVersion ($version) : Doctrine\DBAL\Platforms\AbstractPlatform

Factory method for creating the appropriate platform instance for the given version.

method Doctrine\DBAL\Driver\AbstractPostgreSQLDriver::getDatabase ($conn) : string

Gets the name of the database connected to for this driver.

method Doctrine\DBAL\Driver\AbstractPostgreSQLDriver::getDatabasePlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

Gets the DatabasePlatform instance that provides all the metadata about
the platform this driver connects to.

method Doctrine\DBAL\Driver\AbstractPostgreSQLDriver::getSchemaManager ($conn) : Doctrine\DBAL\Schema\AbstractSchemaManager

Gets the SchemaManager that can be used to inspect and change the underlying
database schema of the platform this driver connects to.

method Doctrine\DBAL\Driver\AbstractPostgreSQLDriver::connect ($params, $username = null, $password = null, $driverOptions = []) : Doctrine\DBAL\Driver\Connection

Attempts to create a connection with the database.

The usage of NULL to indicate empty username or password is deprecated. Use an empty string instead.

method Doctrine\DBAL\Driver\AbstractPostgreSQLDriver::getName () : string

Gets the name of the driver.

class Doctrine\DBAL\Driver::AbstractSQLiteDriver

Abstract base implementation of the Doctrine\DBAL\Driver interface for SQLite based drivers.

method Doctrine\DBAL\Driver\AbstractSQLiteDriver::convertException ($message, $exception) : Doctrine\DBAL\Exception\DriverException

Converts a given DBAL driver exception into a standardized DBAL driver exception.

It evaluates the vendor specific error code and SQLSTATE and transforms
it into a unified Doctrine\DBAL\Exception\DriverException subclass.

method Doctrine\DBAL\Driver\AbstractSQLiteDriver::getDatabase ($conn) : string

Gets the name of the database connected to for this driver.

method Doctrine\DBAL\Driver\AbstractSQLiteDriver::getDatabasePlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

Gets the DatabasePlatform instance that provides all the metadata about
the platform this driver connects to.

method Doctrine\DBAL\Driver\AbstractSQLiteDriver::getSchemaManager ($conn) : Doctrine\DBAL\Schema\AbstractSchemaManager

Gets the SchemaManager that can be used to inspect and change the underlying
database schema of the platform this driver connects to.

method Doctrine\DBAL\Driver\AbstractSQLiteDriver::connect ($params, $username = null, $password = null, $driverOptions = []) : Doctrine\DBAL\Driver\Connection

Attempts to create a connection with the database.

The usage of NULL to indicate empty username or password is deprecated. Use an empty string instead.

method Doctrine\DBAL\Driver\AbstractSQLiteDriver::getName () : string

Gets the name of the driver.

class Doctrine\DBAL\Driver::AbstractSQLServerDriver

Abstract base implementation of the Doctrine\DBAL\Driver interface for Microsoft SQL Server based drivers.

method Doctrine\DBAL\Driver\AbstractSQLServerDriver::createDatabasePlatformForVersion ($version) : Doctrine\DBAL\Platforms\AbstractPlatform

Factory method for creating the appropriate platform instance for the given version.

method Doctrine\DBAL\Driver\AbstractSQLServerDriver::getDatabase ($conn) : string

Gets the name of the database connected to for this driver.

method Doctrine\DBAL\Driver\AbstractSQLServerDriver::getDatabasePlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

Gets the DatabasePlatform instance that provides all the metadata about
the platform this driver connects to.

method Doctrine\DBAL\Driver\AbstractSQLServerDriver::getSchemaManager ($conn) : Doctrine\DBAL\Schema\AbstractSchemaManager

Gets the SchemaManager that can be used to inspect and change the underlying
database schema of the platform this driver connects to.

method Doctrine\DBAL\Driver\AbstractSQLServerDriver::connect ($params, $username = null, $password = null, $driverOptions = []) : Doctrine\DBAL\Driver\Connection

Attempts to create a connection with the database.

The usage of NULL to indicate empty username or password is deprecated. Use an empty string instead.

method Doctrine\DBAL\Driver\AbstractSQLServerDriver::getName () : string

Gets the name of the driver.

class Doctrine\DBAL\Driver::AbstractSQLAnywhereDriver

Abstract base implementation of the Doctrine\DBAL\Driver interface for SAP Sybase SQL Anywhere based drivers.

method Doctrine\DBAL\Driver\AbstractSQLAnywhereDriver::convertException ($message, $exception) : Doctrine\DBAL\Exception\DriverException

Converts a given DBAL driver exception into a standardized DBAL driver exception.

It evaluates the vendor specific error code and SQLSTATE and transforms
it into a unified Doctrine\DBAL\Exception\DriverException subclass.

method Doctrine\DBAL\Driver\AbstractSQLAnywhereDriver::createDatabasePlatformForVersion ($version) : Doctrine\DBAL\Platforms\AbstractPlatform

Factory method for creating the appropriate platform instance for the given version.

method Doctrine\DBAL\Driver\AbstractSQLAnywhereDriver::getDatabase ($conn) : string

Gets the name of the database connected to for this driver.

method Doctrine\DBAL\Driver\AbstractSQLAnywhereDriver::getDatabasePlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

Gets the DatabasePlatform instance that provides all the metadata about
the platform this driver connects to.

method Doctrine\DBAL\Driver\AbstractSQLAnywhereDriver::getSchemaManager ($conn) : Doctrine\DBAL\Schema\AbstractSchemaManager

Gets the SchemaManager that can be used to inspect and change the underlying
database schema of the platform this driver connects to.

method Doctrine\DBAL\Driver\AbstractSQLAnywhereDriver::connect ($params, $username = null, $password = null, $driverOptions = []) : Doctrine\DBAL\Driver\Connection

Attempts to create a connection with the database.

The usage of NULL to indicate empty username or password is deprecated. Use an empty string instead.

method Doctrine\DBAL\Driver\AbstractSQLAnywhereDriver::getName () : string

Gets the name of the driver.

class Doctrine\DBAL\Driver::PDOStatement

The PDO implementation of the Statement interface.
Used by all PDO-based drivers.

property NULL Doctrine\DBAL\Driver\PDOStatement::queryString

method Doctrine\DBAL\Driver\PDOStatement::__construct () : void

Protected constructor.

method Doctrine\DBAL\Driver\PDOStatement::setFetchMode ($fetchMode, $arg2 = null, $arg3 = null) : bool

Sets the fetch mode to use while iterating this statement.

method Doctrine\DBAL\Driver\PDOStatement::bindValue ($param, $value, $type = Doctrine\DBAL\ParameterType::STRING) : bool

Binds a value to a corresponding named (not supported by mysqli driver, see comment below) or positional
placeholder in the SQL statement that was used to prepare the statement.

As mentioned above, the named parameters are not natively supported by the mysqli driver, use executeQuery(),
fetchAll(), fetchArray(), fetchColumn(), fetchAssoc() methods to have the named parameter emulated by doctrine.

method Doctrine\DBAL\Driver\PDOStatement::bindParam ($column, &$variable, $type = Doctrine\DBAL\ParameterType::STRING, $length = null, $driverOptions = null) : bool

Binds a PHP variable to a corresponding named (not supported by mysqli driver, see comment below) or question
mark placeholder in the SQL statement that was use to prepare the statement. Unlike PDOStatement->bindValue(),
the variable is bound as a reference and will only be evaluated at the time
that PDOStatement->execute() is called.

As mentioned above, the named parameters are not natively supported by the mysqli driver, use executeQuery(),
fetchAll(), fetchArray(), fetchColumn(), fetchAssoc() methods to have the named parameter emulated by doctrine.

Most parameters are input parameters, that is, parameters that are
used in a read-only fashion to build up the query. Some drivers support the invocation
of stored procedures that return data as output parameters, and some also as input/output
parameters that both send in data and are updated to receive it.

method Doctrine\DBAL\Driver\PDOStatement::closeCursor () : bool

Closes the cursor, enabling the statement to be executed again.

method Doctrine\DBAL\Driver\PDOStatement::execute ($params = null) : bool

Executes a prepared statement

If the prepared statement included parameter markers, you must either:
call PDOStatement->bindParam() to bind PHP variables to the parameter markers:
bound variables pass their value as input and receive the output value,
if any, of their associated parameter markers or pass an array of input-only
parameter values.

method Doctrine\DBAL\Driver\PDOStatement::fetch ($fetchMode = null, $cursorOrientation = PDO::FETCH_ORI_NEXT, $cursorOffset = 0) : mixed

Returns the next row of a result set.

method Doctrine\DBAL\Driver\PDOStatement::fetchAll ($fetchMode = null, $fetchArgument = null, $ctorArgs = null) : mixed[]

Returns an array containing all of the result set rows.

method Doctrine\DBAL\Driver\PDOStatement::fetchColumn ($columnIndex = 0) : mixedfalse

Returns a single column from the next row of a result set or FALSE if there are no more rows.

method Doctrine\DBAL\Driver\PDOStatement::bindColumn ($column, &$param, $type, $maxlen, $driverdata) : void

method Doctrine\DBAL\Driver\PDOStatement::rowCount () : int

Returns the number of rows affected by the last DELETE, INSERT, or UPDATE statement
executed by the corresponding object.

If the last SQL statement executed by the associated Statement object was a SELECT statement,
some databases may return the number of rows returned by that statement. However,
this behaviour is not guaranteed for all databases and should not be
relied on for portable applications.

method Doctrine\DBAL\Driver\PDOStatement::fetchObject ($class_name, $ctor_args) : void

method Doctrine\DBAL\Driver\PDOStatement::errorCode () : stringintbool

Fetches the SQLSTATE associated with the last operation on the statement handle.

method Doctrine\DBAL\Driver\PDOStatement::errorInfo () : mixed[]

Fetches extended error information associated with the last operation on the statement handle.

method Doctrine\DBAL\Driver\PDOStatement::setAttribute ($attribute, $value) : void

method Doctrine\DBAL\Driver\PDOStatement::getAttribute ($attribute) : void

method Doctrine\DBAL\Driver\PDOStatement::columnCount () : int

Returns the number of columns in the result set

method Doctrine\DBAL\Driver\PDOStatement::getColumnMeta ($column) : void

method Doctrine\DBAL\Driver\PDOStatement::nextRowset () : void

method Doctrine\DBAL\Driver\PDOStatement::debugDumpParams () : void

method Doctrine\DBAL\Driver\PDOStatement::__wakeup () : void

method Doctrine\DBAL\Driver\PDOStatement::__sleep () : void

class Doctrine\DBAL\Driver::PDOException

Tiny wrapper for PDOException instances to implement the Doctrine\DBAL\Driver\DriverException interface.

property string Doctrine\DBAL\Driver\PDOException::message

property integer Doctrine\DBAL\Driver\PDOException::code

property NULL Doctrine\DBAL\Driver\PDOException::file

property NULL Doctrine\DBAL\Driver\PDOException::line

property NULL Doctrine\DBAL\Driver\PDOException::errorInfo

method Doctrine\DBAL\Driver\PDOException::__construct ($exception) : void

method Doctrine\DBAL\Driver\PDOException::getErrorCode () : intstringnull

Returns the driver specific error code if available.

Returns null if no driver specific error code is available
for the error raised by the driver.

method Doctrine\DBAL\Driver\PDOException::getSQLState () : stringnull

Returns the SQLSTATE the driver was in at the time the error occurred.

Returns null if the driver does not provide a SQLSTATE for the error occurred.

method Doctrine\DBAL\Driver\PDOException::__wakeup () : void

method Doctrine\DBAL\Driver\PDOException::getMessage () : string

Returns the driver error message.

method Doctrine\DBAL\Driver\PDOException::getCode () : void

method Doctrine\DBAL\Driver\PDOException::getFile () : void

method Doctrine\DBAL\Driver\PDOException::getLine () : void

method Doctrine\DBAL\Driver\PDOException::getTrace () : void

method Doctrine\DBAL\Driver\PDOException::getPrevious () : void

method Doctrine\DBAL\Driver\PDOException::getTraceAsString () : void

method Doctrine\DBAL\Driver\PDOException::__toString () : void

interface Doctrine\DBAL\Driver::Connection

Connection interface.
Driver connections must implement this interface.

This resembles (a subset of) the PDO interface.

method Doctrine\DBAL\Driver\Connection::prepare ($prepareString) : Doctrine\DBAL\Driver\Statement

Prepares a statement for execution and returns a Statement object.

method Doctrine\DBAL\Driver\Connection::query () : Doctrine\DBAL\Driver\Statement

Executes an SQL statement, returning a result set as a Statement object.

method Doctrine\DBAL\Driver\Connection::quote ($input, $type = Doctrine\DBAL\ParameterType::STRING) : mixed

Quotes a string for use in a query.

method Doctrine\DBAL\Driver\Connection::exec ($statement) : int

Executes an SQL statement and return the number of affected rows.

method Doctrine\DBAL\Driver\Connection::lastInsertId ($name = null) : string

Returns the ID of the last inserted row or sequence value.

method Doctrine\DBAL\Driver\Connection::beginTransaction () : bool

Initiates a transaction.

method Doctrine\DBAL\Driver\Connection::commit () : bool

Commits a transaction.

method Doctrine\DBAL\Driver\Connection::rollBack () : bool

Rolls back the current transaction, as initiated by beginTransaction().

method Doctrine\DBAL\Driver\Connection::errorCode () : stringnull

Returns the error code associated with the last operation on the database handle.

method Doctrine\DBAL\Driver\Connection::errorInfo () : mixed[]

Returns extended error information associated with the last operation on the database handle.

interface Doctrine\DBAL\Driver::ResultStatement

Interface for the reading part of a prepare statement only.

method Doctrine\DBAL\Driver\ResultStatement::closeCursor () : bool

Closes the cursor, enabling the statement to be executed again.

method Doctrine\DBAL\Driver\ResultStatement::columnCount () : int

Returns the number of columns in the result set

method Doctrine\DBAL\Driver\ResultStatement::setFetchMode ($fetchMode, $arg2 = null, $arg3 = null) : bool

Sets the fetch mode to use while iterating this statement.

method Doctrine\DBAL\Driver\ResultStatement::fetch ($fetchMode = null, $cursorOrientation = PDO::FETCH_ORI_NEXT, $cursorOffset = 0) : mixed

Returns the next row of a result set.

method Doctrine\DBAL\Driver\ResultStatement::fetchAll ($fetchMode = null, $fetchArgument = null, $ctorArgs = null) : mixed[]

Returns an array containing all of the result set rows.

method Doctrine\DBAL\Driver\ResultStatement::fetchColumn ($columnIndex = 0) : mixedfalse

Returns a single column from the next row of a result set or FALSE if there are no more rows.

interface Doctrine\DBAL\Driver::DriverException

Contract for a driver exception.

Driver exceptions provide the SQLSTATE of the driver
and the driver specific error code at the time the error occurred.

method Doctrine\DBAL\Driver\DriverException::getErrorCode () : intstringnull

Returns the driver specific error code if available.

Returns null if no driver specific error code is available
for the error raised by the driver.

method Doctrine\DBAL\Driver\DriverException::getMessage () : string

Returns the driver error message.

method Doctrine\DBAL\Driver\DriverException::getSQLState () : stringnull

Returns the SQLSTATE the driver was in at the time the error occurred.

Returns null if the driver does not provide a SQLSTATE for the error occurred.

method Doctrine\DBAL\Driver\DriverException::getCode () : void

method Doctrine\DBAL\Driver\DriverException::getFile () : void

method Doctrine\DBAL\Driver\DriverException::getLine () : void

method Doctrine\DBAL\Driver\DriverException::getTrace () : void

method Doctrine\DBAL\Driver\DriverException::getPrevious () : void

method Doctrine\DBAL\Driver\DriverException::getTraceAsString () : void

method Doctrine\DBAL\Driver\DriverException::__toString () : void

interface Doctrine\DBAL\Driver::ExceptionConverterDriver

Contract for a driver that is capable of converting DBAL driver exceptions into standardized DBAL driver exceptions.

method Doctrine\DBAL\Driver\ExceptionConverterDriver::convertException ($message, $exception) : Doctrine\DBAL\Exception\DriverException

Converts a given DBAL driver exception into a standardized DBAL driver exception.

It evaluates the vendor specific error code and SQLSTATE and transforms
it into a unified Doctrine\DBAL\Exception\DriverException subclass.

interface Doctrine\DBAL\Driver::Statement

Statement interface.
Drivers must implement this interface.

This resembles (a subset of) the PDOStatement interface.

method Doctrine\DBAL\Driver\Statement::bindValue ($param, $value, $type = Doctrine\DBAL\ParameterType::STRING) : bool

Binds a value to a corresponding named (not supported by mysqli driver, see comment below) or positional
placeholder in the SQL statement that was used to prepare the statement.

As mentioned above, the named parameters are not natively supported by the mysqli driver, use executeQuery(),
fetchAll(), fetchArray(), fetchColumn(), fetchAssoc() methods to have the named parameter emulated by doctrine.

method Doctrine\DBAL\Driver\Statement::bindParam ($column, &$variable, $type = Doctrine\DBAL\ParameterType::STRING, $length = null) : bool

Binds a PHP variable to a corresponding named (not supported by mysqli driver, see comment below) or question
mark placeholder in the SQL statement that was use to prepare the statement. Unlike PDOStatement->bindValue(),
the variable is bound as a reference and will only be evaluated at the time
that PDOStatement->execute() is called.

As mentioned above, the named parameters are not natively supported by the mysqli driver, use executeQuery(),
fetchAll(), fetchArray(), fetchColumn(), fetchAssoc() methods to have the named parameter emulated by doctrine.

Most parameters are input parameters, that is, parameters that are
used in a read-only fashion to build up the query. Some drivers support the invocation
of stored procedures that return data as output parameters, and some also as input/output
parameters that both send in data and are updated to receive it.

method Doctrine\DBAL\Driver\Statement::errorCode () : stringintbool

Fetches the SQLSTATE associated with the last operation on the statement handle.

method Doctrine\DBAL\Driver\Statement::errorInfo () : mixed[]

Fetches extended error information associated with the last operation on the statement handle.

method Doctrine\DBAL\Driver\Statement::execute ($params = null) : bool

Executes a prepared statement

If the prepared statement included parameter markers, you must either:
call PDOStatement->bindParam() to bind PHP variables to the parameter markers:
bound variables pass their value as input and receive the output value,
if any, of their associated parameter markers or pass an array of input-only
parameter values.

method Doctrine\DBAL\Driver\Statement::rowCount () : int

Returns the number of rows affected by the last DELETE, INSERT, or UPDATE statement
executed by the corresponding object.

If the last SQL statement executed by the associated Statement object was a SELECT statement,
some databases may return the number of rows returned by that statement. However,
this behaviour is not guaranteed for all databases and should not be
relied on for portable applications.

method Doctrine\DBAL\Driver\Statement::closeCursor () : bool

Closes the cursor, enabling the statement to be executed again.

method Doctrine\DBAL\Driver\Statement::columnCount () : int

Returns the number of columns in the result set

method Doctrine\DBAL\Driver\Statement::setFetchMode ($fetchMode, $arg2 = null, $arg3 = null) : bool

Sets the fetch mode to use while iterating this statement.

method Doctrine\DBAL\Driver\Statement::fetch ($fetchMode = null, $cursorOrientation = PDO::FETCH_ORI_NEXT, $cursorOffset = 0) : mixed

Returns the next row of a result set.

method Doctrine\DBAL\Driver\Statement::fetchAll ($fetchMode = null, $fetchArgument = null, $ctorArgs = null) : mixed[]

Returns an array containing all of the result set rows.

method Doctrine\DBAL\Driver\Statement::fetchColumn ($columnIndex = 0) : mixedfalse

Returns a single column from the next row of a result set or FALSE if there are no more rows.

interface Doctrine\DBAL\Driver::PingableConnection

An interface for connections which support a "native" ping method.

method Doctrine\DBAL\Driver\PingableConnection::ping () : bool

Pings the database server to determine if the connection is still
available. Return true/false based on if that was successful or not.

interface Doctrine\DBAL\Driver::ServerInfoAwareConnection

Contract for a connection that is able to provide information about the server it is connected to.

method Doctrine\DBAL\Driver\ServerInfoAwareConnection::getServerVersion () : string

Returns the version number of the database server connected to.

method Doctrine\DBAL\Driver\ServerInfoAwareConnection::requiresQueryForServerVersion () : bool

Checks whether a query is required to retrieve the database server version.

namespace Doctrine\DBAL\Event

namespace Doctrine\DBAL\Event\Listeners

class Doctrine\DBAL\Event\Listeners::SQLSessionInit

Session init listener for executing a single SQL statement right after a connection is opened.

property string Doctrine\DBAL\Event\Listeners\SQLSessionInit::sql

method Doctrine\DBAL\Event\Listeners\SQLSessionInit::__construct ($sql) : void

method Doctrine\DBAL\Event\Listeners\SQLSessionInit::postConnect ($args) : void

method Doctrine\DBAL\Event\Listeners\SQLSessionInit::getSubscribedEvents () : string[]

Returns an array of events this subscriber wants to listen to.

class Doctrine\DBAL\Event::SchemaEventArgs

Base class for schema related events.

method Doctrine\DBAL\Event\SchemaEventArgs::preventDefault () : Doctrine\DBAL\Event\SchemaEventArgs

method Doctrine\DBAL\Event\SchemaEventArgs::isDefaultPrevented () : bool

method Doctrine\DBAL\Event\SchemaEventArgs::getEmptyInstance () : Doctrine\Common\EventArgs

Gets the single, empty and immutable EventArgs instance.

This instance will be used when events are dispatched without any parameter,
like this: EventManager::dispatchEvent('eventname');

The benefit from this is that only one empty instance is instantiated and shared
(otherwise there would be instances for every dispatched in the abovementioned form).

class Doctrine\DBAL\Event::SchemaAlterTableAddColumnEventArgs

Event Arguments used when SQL queries for adding table columns are generated inside Doctrine\DBAL\Platform*Platform.

method Doctrine\DBAL\Event\SchemaAlterTableAddColumnEventArgs::__construct ($column, $tableDiff, $platform) : void

method Doctrine\DBAL\Event\SchemaAlterTableAddColumnEventArgs::getColumn () : Doctrine\DBAL\Schema\Column

method Doctrine\DBAL\Event\SchemaAlterTableAddColumnEventArgs::getTableDiff () : Doctrine\DBAL\Schema\TableDiff

method Doctrine\DBAL\Event\SchemaAlterTableAddColumnEventArgs::getPlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

method Doctrine\DBAL\Event\SchemaAlterTableAddColumnEventArgs::addSql ($sql) : Doctrine\DBAL\Event\SchemaAlterTableAddColumnEventArgs

Passing multiple SQL statements as an array is deprecated. Pass each statement as an individual argument instead.

method Doctrine\DBAL\Event\SchemaAlterTableAddColumnEventArgs::getSql () : string[]

method Doctrine\DBAL\Event\SchemaAlterTableAddColumnEventArgs::preventDefault () : Doctrine\DBAL\Event\SchemaEventArgs

method Doctrine\DBAL\Event\SchemaAlterTableAddColumnEventArgs::isDefaultPrevented () : bool

method Doctrine\DBAL\Event\SchemaAlterTableAddColumnEventArgs::getEmptyInstance () : Doctrine\Common\EventArgs

Gets the single, empty and immutable EventArgs instance.

This instance will be used when events are dispatched without any parameter,
like this: EventManager::dispatchEvent('eventname');

The benefit from this is that only one empty instance is instantiated and shared
(otherwise there would be instances for every dispatched in the abovementioned form).

class Doctrine\DBAL\Event::SchemaAlterTableChangeColumnEventArgs

Event Arguments used when SQL queries for changing table columns are generated inside Doctrine\DBAL\Platform*Platform.

method Doctrine\DBAL\Event\SchemaAlterTableChangeColumnEventArgs::__construct ($columnDiff, $tableDiff, $platform) : void

method Doctrine\DBAL\Event\SchemaAlterTableChangeColumnEventArgs::getColumnDiff () : Doctrine\DBAL\Schema\ColumnDiff

method Doctrine\DBAL\Event\SchemaAlterTableChangeColumnEventArgs::getTableDiff () : Doctrine\DBAL\Schema\TableDiff

method Doctrine\DBAL\Event\SchemaAlterTableChangeColumnEventArgs::getPlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

method Doctrine\DBAL\Event\SchemaAlterTableChangeColumnEventArgs::addSql ($sql) : Doctrine\DBAL\Event\SchemaAlterTableChangeColumnEventArgs

Passing multiple SQL statements as an array is deprecated. Pass each statement as an individual argument instead.

method Doctrine\DBAL\Event\SchemaAlterTableChangeColumnEventArgs::getSql () : string[]

method Doctrine\DBAL\Event\SchemaAlterTableChangeColumnEventArgs::preventDefault () : Doctrine\DBAL\Event\SchemaEventArgs

method Doctrine\DBAL\Event\SchemaAlterTableChangeColumnEventArgs::isDefaultPrevented () : bool

method Doctrine\DBAL\Event\SchemaAlterTableChangeColumnEventArgs::getEmptyInstance () : Doctrine\Common\EventArgs

Gets the single, empty and immutable EventArgs instance.

This instance will be used when events are dispatched without any parameter,
like this: EventManager::dispatchEvent('eventname');

The benefit from this is that only one empty instance is instantiated and shared
(otherwise there would be instances for every dispatched in the abovementioned form).

class Doctrine\DBAL\Event::SchemaAlterTableEventArgs

Event Arguments used when SQL queries for creating tables are generated inside Doctrine\DBAL\Platform*Platform.

method Doctrine\DBAL\Event\SchemaAlterTableEventArgs::__construct ($tableDiff, $platform) : void

method Doctrine\DBAL\Event\SchemaAlterTableEventArgs::getTableDiff () : Doctrine\DBAL\Schema\TableDiff

method Doctrine\DBAL\Event\SchemaAlterTableEventArgs::getPlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

method Doctrine\DBAL\Event\SchemaAlterTableEventArgs::addSql ($sql) : Doctrine\DBAL\Event\SchemaAlterTableEventArgs

Passing multiple SQL statements as an array is deprecated. Pass each statement as an individual argument instead.

method Doctrine\DBAL\Event\SchemaAlterTableEventArgs::getSql () : string[]

method Doctrine\DBAL\Event\SchemaAlterTableEventArgs::preventDefault () : Doctrine\DBAL\Event\SchemaEventArgs

method Doctrine\DBAL\Event\SchemaAlterTableEventArgs::isDefaultPrevented () : bool

method Doctrine\DBAL\Event\SchemaAlterTableEventArgs::getEmptyInstance () : Doctrine\Common\EventArgs

Gets the single, empty and immutable EventArgs instance.

This instance will be used when events are dispatched without any parameter,
like this: EventManager::dispatchEvent('eventname');

The benefit from this is that only one empty instance is instantiated and shared
(otherwise there would be instances for every dispatched in the abovementioned form).

class Doctrine\DBAL\Event::SchemaAlterTableRemoveColumnEventArgs

Event Arguments used when SQL queries for removing table columns are generated inside Doctrine\DBAL\Platform*Platform.

method Doctrine\DBAL\Event\SchemaAlterTableRemoveColumnEventArgs::__construct ($column, $tableDiff, $platform) : void

method Doctrine\DBAL\Event\SchemaAlterTableRemoveColumnEventArgs::getColumn () : Doctrine\DBAL\Schema\Column

method Doctrine\DBAL\Event\SchemaAlterTableRemoveColumnEventArgs::getTableDiff () : Doctrine\DBAL\Schema\TableDiff

method Doctrine\DBAL\Event\SchemaAlterTableRemoveColumnEventArgs::getPlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

method Doctrine\DBAL\Event\SchemaAlterTableRemoveColumnEventArgs::addSql ($sql) : Doctrine\DBAL\Event\SchemaAlterTableRemoveColumnEventArgs

Passing multiple SQL statements as an array is deprecated. Pass each statement as an individual argument instead.

method Doctrine\DBAL\Event\SchemaAlterTableRemoveColumnEventArgs::getSql () : string[]

method Doctrine\DBAL\Event\SchemaAlterTableRemoveColumnEventArgs::preventDefault () : Doctrine\DBAL\Event\SchemaEventArgs

method Doctrine\DBAL\Event\SchemaAlterTableRemoveColumnEventArgs::isDefaultPrevented () : bool

method Doctrine\DBAL\Event\SchemaAlterTableRemoveColumnEventArgs::getEmptyInstance () : Doctrine\Common\EventArgs

Gets the single, empty and immutable EventArgs instance.

This instance will be used when events are dispatched without any parameter,
like this: EventManager::dispatchEvent('eventname');

The benefit from this is that only one empty instance is instantiated and shared
(otherwise there would be instances for every dispatched in the abovementioned form).

class Doctrine\DBAL\Event::SchemaAlterTableRenameColumnEventArgs

Event Arguments used when SQL queries for renaming table columns are generated inside Doctrine\DBAL\Platform*Platform.

method Doctrine\DBAL\Event\SchemaAlterTableRenameColumnEventArgs::__construct ($oldColumnName, $column, $tableDiff, $platform) : void

method Doctrine\DBAL\Event\SchemaAlterTableRenameColumnEventArgs::getOldColumnName () : string

method Doctrine\DBAL\Event\SchemaAlterTableRenameColumnEventArgs::getColumn () : Doctrine\DBAL\Schema\Column

method Doctrine\DBAL\Event\SchemaAlterTableRenameColumnEventArgs::getTableDiff () : Doctrine\DBAL\Schema\TableDiff

method Doctrine\DBAL\Event\SchemaAlterTableRenameColumnEventArgs::getPlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

method Doctrine\DBAL\Event\SchemaAlterTableRenameColumnEventArgs::addSql ($sql) : Doctrine\DBAL\Event\SchemaAlterTableRenameColumnEventArgs

Passing multiple SQL statements as an array is deprecated. Pass each statement as an individual argument instead.

method Doctrine\DBAL\Event\SchemaAlterTableRenameColumnEventArgs::getSql () : string[]

method Doctrine\DBAL\Event\SchemaAlterTableRenameColumnEventArgs::preventDefault () : Doctrine\DBAL\Event\SchemaEventArgs

method Doctrine\DBAL\Event\SchemaAlterTableRenameColumnEventArgs::isDefaultPrevented () : bool

method Doctrine\DBAL\Event\SchemaAlterTableRenameColumnEventArgs::getEmptyInstance () : Doctrine\Common\EventArgs

Gets the single, empty and immutable EventArgs instance.

This instance will be used when events are dispatched without any parameter,
like this: EventManager::dispatchEvent('eventname');

The benefit from this is that only one empty instance is instantiated and shared
(otherwise there would be instances for every dispatched in the abovementioned form).

class Doctrine\DBAL\Event::SchemaCreateTableColumnEventArgs

Event Arguments used when SQL queries for creating table columns are generated inside Doctrine\DBAL\Platform\AbstractPlatform.

method Doctrine\DBAL\Event\SchemaCreateTableColumnEventArgs::__construct ($column, $table, $platform) : void

method Doctrine\DBAL\Event\SchemaCreateTableColumnEventArgs::getColumn () : Doctrine\DBAL\Schema\Column

method Doctrine\DBAL\Event\SchemaCreateTableColumnEventArgs::getTable () : Doctrine\DBAL\Schema\Table

method Doctrine\DBAL\Event\SchemaCreateTableColumnEventArgs::getPlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

method Doctrine\DBAL\Event\SchemaCreateTableColumnEventArgs::addSql ($sql) : Doctrine\DBAL\Event\SchemaCreateTableColumnEventArgs

Passing multiple SQL statements as an array is deprecated. Pass each statement as an individual argument instead.

method Doctrine\DBAL\Event\SchemaCreateTableColumnEventArgs::getSql () : string[]

method Doctrine\DBAL\Event\SchemaCreateTableColumnEventArgs::preventDefault () : Doctrine\DBAL\Event\SchemaEventArgs

method Doctrine\DBAL\Event\SchemaCreateTableColumnEventArgs::isDefaultPrevented () : bool

method Doctrine\DBAL\Event\SchemaCreateTableColumnEventArgs::getEmptyInstance () : Doctrine\Common\EventArgs

Gets the single, empty and immutable EventArgs instance.

This instance will be used when events are dispatched without any parameter,
like this: EventManager::dispatchEvent('eventname');

The benefit from this is that only one empty instance is instantiated and shared
(otherwise there would be instances for every dispatched in the abovementioned form).

class Doctrine\DBAL\Event::SchemaCreateTableEventArgs

Event Arguments used when SQL queries for creating tables are generated inside Doctrine\DBAL\Platform\AbstractPlatform.

method Doctrine\DBAL\Event\SchemaCreateTableEventArgs::__construct ($table, $columns, $options, $platform) : void

method Doctrine\DBAL\Event\SchemaCreateTableEventArgs::getTable () : Doctrine\DBAL\Schema\Table

method Doctrine\DBAL\Event\SchemaCreateTableEventArgs::getColumns () : mixed[][]

method Doctrine\DBAL\Event\SchemaCreateTableEventArgs::getOptions () : mixed[]

method Doctrine\DBAL\Event\SchemaCreateTableEventArgs::getPlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

method Doctrine\DBAL\Event\SchemaCreateTableEventArgs::addSql ($sql) : Doctrine\DBAL\Event\SchemaCreateTableEventArgs

Passing multiple SQL statements as an array is deprecated. Pass each statement as an individual argument instead.

method Doctrine\DBAL\Event\SchemaCreateTableEventArgs::getSql () : string[]

method Doctrine\DBAL\Event\SchemaCreateTableEventArgs::preventDefault () : Doctrine\DBAL\Event\SchemaEventArgs

method Doctrine\DBAL\Event\SchemaCreateTableEventArgs::isDefaultPrevented () : bool

method Doctrine\DBAL\Event\SchemaCreateTableEventArgs::getEmptyInstance () : Doctrine\Common\EventArgs

Gets the single, empty and immutable EventArgs instance.

This instance will be used when events are dispatched without any parameter,
like this: EventManager::dispatchEvent('eventname');

The benefit from this is that only one empty instance is instantiated and shared
(otherwise there would be instances for every dispatched in the abovementioned form).

class Doctrine\DBAL\Event::SchemaDropTableEventArgs

Event Arguments used when the SQL query for dropping tables are generated inside Doctrine\DBAL\Platform\AbstractPlatform.

method Doctrine\DBAL\Event\SchemaDropTableEventArgs::__construct ($table, $platform) : void

method Doctrine\DBAL\Event\SchemaDropTableEventArgs::getTable () : stringDoctrine\DBAL\Schema\Table

method Doctrine\DBAL\Event\SchemaDropTableEventArgs::getPlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

method Doctrine\DBAL\Event\SchemaDropTableEventArgs::setSql ($sql) : Doctrine\DBAL\Event\SchemaDropTableEventArgs

method Doctrine\DBAL\Event\SchemaDropTableEventArgs::getSql () : stringnull

method Doctrine\DBAL\Event\SchemaDropTableEventArgs::preventDefault () : Doctrine\DBAL\Event\SchemaEventArgs

method Doctrine\DBAL\Event\SchemaDropTableEventArgs::isDefaultPrevented () : bool

method Doctrine\DBAL\Event\SchemaDropTableEventArgs::getEmptyInstance () : Doctrine\Common\EventArgs

Gets the single, empty and immutable EventArgs instance.

This instance will be used when events are dispatched without any parameter,
like this: EventManager::dispatchEvent('eventname');

The benefit from this is that only one empty instance is instantiated and shared
(otherwise there would be instances for every dispatched in the abovementioned form).

class Doctrine\DBAL\Event::SchemaColumnDefinitionEventArgs

Event Arguments used when the portable column definition is generated inside Doctrine\DBAL\Schema\AbstractSchemaManager.

method Doctrine\DBAL\Event\SchemaColumnDefinitionEventArgs::__construct ($tableColumn, $table, $database, $connection) : void

method Doctrine\DBAL\Event\SchemaColumnDefinitionEventArgs::setColumn ($column = null) : Doctrine\DBAL\Event\SchemaColumnDefinitionEventArgs

Allows to clear the column which means the column will be excluded from
tables column list.

method Doctrine\DBAL\Event\SchemaColumnDefinitionEventArgs::getColumn () : Doctrine\DBAL\Schema\Columnnull

method Doctrine\DBAL\Event\SchemaColumnDefinitionEventArgs::getTableColumn () : mixed[]

method Doctrine\DBAL\Event\SchemaColumnDefinitionEventArgs::getTable () : string

method Doctrine\DBAL\Event\SchemaColumnDefinitionEventArgs::getDatabase () : string

method Doctrine\DBAL\Event\SchemaColumnDefinitionEventArgs::getConnection () : Doctrine\DBAL\Connection

method Doctrine\DBAL\Event\SchemaColumnDefinitionEventArgs::getDatabasePlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

method Doctrine\DBAL\Event\SchemaColumnDefinitionEventArgs::preventDefault () : Doctrine\DBAL\Event\SchemaEventArgs

method Doctrine\DBAL\Event\SchemaColumnDefinitionEventArgs::isDefaultPrevented () : bool

method Doctrine\DBAL\Event\SchemaColumnDefinitionEventArgs::getEmptyInstance () : Doctrine\Common\EventArgs

Gets the single, empty and immutable EventArgs instance.

This instance will be used when events are dispatched without any parameter,
like this: EventManager::dispatchEvent('eventname');

The benefit from this is that only one empty instance is instantiated and shared
(otherwise there would be instances for every dispatched in the abovementioned form).

class Doctrine\DBAL\Event::SchemaIndexDefinitionEventArgs

Event Arguments used when the portable index definition is generated inside Doctrine\DBAL\Schema\AbstractSchemaManager.

method Doctrine\DBAL\Event\SchemaIndexDefinitionEventArgs::__construct ($tableIndex, $table, $connection) : void

method Doctrine\DBAL\Event\SchemaIndexDefinitionEventArgs::setIndex ($index = null) : Doctrine\DBAL\Event\SchemaIndexDefinitionEventArgs

Allows to clear the index which means the index will be excluded from tables index list.

method Doctrine\DBAL\Event\SchemaIndexDefinitionEventArgs::getIndex () : Doctrine\DBAL\Schema\Indexnull

method Doctrine\DBAL\Event\SchemaIndexDefinitionEventArgs::getTableIndex () : mixed[]

method Doctrine\DBAL\Event\SchemaIndexDefinitionEventArgs::getTable () : string

method Doctrine\DBAL\Event\SchemaIndexDefinitionEventArgs::getConnection () : Doctrine\DBAL\Connection

method Doctrine\DBAL\Event\SchemaIndexDefinitionEventArgs::getDatabasePlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

method Doctrine\DBAL\Event\SchemaIndexDefinitionEventArgs::preventDefault () : Doctrine\DBAL\Event\SchemaEventArgs

method Doctrine\DBAL\Event\SchemaIndexDefinitionEventArgs::isDefaultPrevented () : bool

method Doctrine\DBAL\Event\SchemaIndexDefinitionEventArgs::getEmptyInstance () : Doctrine\Common\EventArgs

Gets the single, empty and immutable EventArgs instance.

This instance will be used when events are dispatched without any parameter,
like this: EventManager::dispatchEvent('eventname');

The benefit from this is that only one empty instance is instantiated and shared
(otherwise there would be instances for every dispatched in the abovementioned form).

class Doctrine\DBAL\Event::ConnectionEventArgs

Event Arguments used when a Driver connection is established inside Doctrine\DBAL\Connection.

method Doctrine\DBAL\Event\ConnectionEventArgs::__construct ($connection) : void

method Doctrine\DBAL\Event\ConnectionEventArgs::getConnection () : Doctrine\DBAL\Connection

method Doctrine\DBAL\Event\ConnectionEventArgs::getDriver () : Doctrine\DBAL\Driver

method Doctrine\DBAL\Event\ConnectionEventArgs::getDatabasePlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

method Doctrine\DBAL\Event\ConnectionEventArgs::getSchemaManager () : Doctrine\DBAL\Schema\AbstractSchemaManager

method Doctrine\DBAL\Event\ConnectionEventArgs::getEmptyInstance () : Doctrine\Common\EventArgs

Gets the single, empty and immutable EventArgs instance.

This instance will be used when events are dispatched without any parameter,
like this: EventManager::dispatchEvent('eventname');

The benefit from this is that only one empty instance is instantiated and shared
(otherwise there would be instances for every dispatched in the abovementioned form).

namespace Doctrine\DBAL\Exception

class Doctrine\DBAL\Exception::DriverException

Base class for all errors detected in the driver.

property string Doctrine\DBAL\Exception\DriverException::message

property integer Doctrine\DBAL\Exception\DriverException::code

property NULL Doctrine\DBAL\Exception\DriverException::file

property NULL Doctrine\DBAL\Exception\DriverException::line

method Doctrine\DBAL\Exception\DriverException::__construct ($message, $driverException) : void

method Doctrine\DBAL\Exception\DriverException::getErrorCode () : intstringnull

Returns the driver specific error code if given.

Returns null if no error code was given by the driver.

method Doctrine\DBAL\Exception\DriverException::getSQLState () : stringnull

Returns the SQLSTATE the driver was in at the time the error occurred, if given.

Returns null if no SQLSTATE was given by the driver.

method Doctrine\DBAL\Exception\DriverException::notSupported ($method) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\DriverException::invalidPlatformSpecified () : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\DriverException::invalidPlatformType ($invalidPlatform) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\DriverException::invalidPlatformVersionSpecified ($version, $expectedFormat) : Doctrine\DBAL\DBALException

Returns a new instance for an invalid specified platform version.

method Doctrine\DBAL\Exception\DriverException::invalidPdoInstance () : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\DriverException::driverRequired ($url = null) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\DriverException::unknownDriver ($unknownDriverName, $knownDrivers) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\DriverException::driverExceptionDuringQuery ($driver, $driverEx, $sql, $params = []) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\DriverException::driverException ($driver, $driverEx) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\DriverException::invalidWrapperClass ($wrapperClass) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\DriverException::invalidDriverClass ($driverClass) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\DriverException::invalidTableName ($tableName) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\DriverException::noColumnsSpecifiedForTable ($tableName) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\DriverException::limitOffsetInvalid () : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\DriverException::typeExists ($name) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\DriverException::unknownColumnType ($name) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\DriverException::typeNotFound ($name) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\DriverException::typeNotRegistered ($type) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\DriverException::typeAlreadyRegistered ($type) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\DriverException::__wakeup () : void

method Doctrine\DBAL\Exception\DriverException::getMessage () : void

method Doctrine\DBAL\Exception\DriverException::getCode () : void

method Doctrine\DBAL\Exception\DriverException::getFile () : void

method Doctrine\DBAL\Exception\DriverException::getLine () : void

method Doctrine\DBAL\Exception\DriverException::getTrace () : void

method Doctrine\DBAL\Exception\DriverException::getPrevious () : void

method Doctrine\DBAL\Exception\DriverException::getTraceAsString () : void

method Doctrine\DBAL\Exception\DriverException::__toString () : void

class Doctrine\DBAL\Exception::InvalidArgumentException

Exception to be thrown when invalid arguments are passed to any DBAL API

property string Doctrine\DBAL\Exception\InvalidArgumentException::message

property integer Doctrine\DBAL\Exception\InvalidArgumentException::code

property NULL Doctrine\DBAL\Exception\InvalidArgumentException::file

property NULL Doctrine\DBAL\Exception\InvalidArgumentException::line

method Doctrine\DBAL\Exception\InvalidArgumentException::fromEmptyCriteria () : Doctrine\DBAL\Exception\InvalidArgumentException

method Doctrine\DBAL\Exception\InvalidArgumentException::notSupported ($method) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\InvalidArgumentException::invalidPlatformSpecified () : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\InvalidArgumentException::invalidPlatformType ($invalidPlatform) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\InvalidArgumentException::invalidPlatformVersionSpecified ($version, $expectedFormat) : Doctrine\DBAL\DBALException

Returns a new instance for an invalid specified platform version.

method Doctrine\DBAL\Exception\InvalidArgumentException::invalidPdoInstance () : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\InvalidArgumentException::driverRequired ($url = null) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\InvalidArgumentException::unknownDriver ($unknownDriverName, $knownDrivers) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\InvalidArgumentException::driverExceptionDuringQuery ($driver, $driverEx, $sql, $params = []) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\InvalidArgumentException::driverException ($driver, $driverEx) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\InvalidArgumentException::invalidWrapperClass ($wrapperClass) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\InvalidArgumentException::invalidDriverClass ($driverClass) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\InvalidArgumentException::invalidTableName ($tableName) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\InvalidArgumentException::noColumnsSpecifiedForTable ($tableName) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\InvalidArgumentException::limitOffsetInvalid () : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\InvalidArgumentException::typeExists ($name) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\InvalidArgumentException::unknownColumnType ($name) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\InvalidArgumentException::typeNotFound ($name) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\InvalidArgumentException::typeNotRegistered ($type) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\InvalidArgumentException::typeAlreadyRegistered ($type) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Exception\InvalidArgumentException::__construct ($message, $code, $previous) : void

method Doctrine\DBAL\Exception\InvalidArgumentException::__wakeup () : void

method Doctrine\DBAL\Exception\InvalidArgumentException::getMessage () : void

method Doctrine\DBAL\Exception\InvalidArgumentException::getCode () : void

method Doctrine\DBAL\Exception\InvalidArgumentException::getFile () : void

method Doctrine\DBAL\Exception\InvalidArgumentException::getLine () : void

method Doctrine\DBAL\Exception\InvalidArgumentException::getTrace () : void

method Doctrine\DBAL\Exception\InvalidArgumentException::getPrevious () : void

method Doctrine\DBAL\Exception\InvalidArgumentException::getTraceAsString () : void

method Doctrine\DBAL\Exception\InvalidArgumentException::__toString () : void

namespace Doctrine\DBAL\Logging

class Doctrine\DBAL\Logging::LoggerChain

Chains multiple SQLLogger.

method Doctrine\DBAL\Logging\LoggerChain::__construct ($loggers = []) : void

method Doctrine\DBAL\Logging\LoggerChain::addLogger ($logger) : void

Adds a logger in the chain.

method Doctrine\DBAL\Logging\LoggerChain::startQuery ($sql, $params = null, $types = null) : void

Logs a SQL statement somewhere.

method Doctrine\DBAL\Logging\LoggerChain::stopQuery () : void

Marks the last started query as stopped. This can be used for timing of queries.

interface Doctrine\DBAL\Logging::SQLLogger

Interface for SQL loggers.

method Doctrine\DBAL\Logging\SQLLogger::startQuery ($sql, $params = null, $types = null) : void

Logs a SQL statement somewhere.

method Doctrine\DBAL\Logging\SQLLogger::stopQuery () : void

Marks the last started query as stopped. This can be used for timing of queries.

namespace Doctrine\DBAL\Platforms

namespace Doctrine\DBAL\Platforms\Keywords

class Doctrine\DBAL\Platforms\Keywords::KeywordList

Abstract interface for a SQL reserved keyword dictionary.

method Doctrine\DBAL\Platforms\Keywords\KeywordList::isKeyword ($word) : bool

Checks if the given word is a keyword of this dialect/vendor platform.

method Doctrine\DBAL\Platforms\Keywords\KeywordList::initializeKeywords () : void

method Doctrine\DBAL\Platforms\Keywords\KeywordList::getKeywords () : string[]

Returns the list of keywords.

method Doctrine\DBAL\Platforms\Keywords\KeywordList::getName () : string

Returns the name of this keyword list.

class Doctrine\DBAL\Platforms\Keywords::PostgreSQLKeywords

PostgreSQL Keywordlist.

method Doctrine\DBAL\Platforms\Keywords\PostgreSQLKeywords::getName () : string

Returns the name of this keyword list.

method Doctrine\DBAL\Platforms\Keywords\PostgreSQLKeywords::getKeywords () : string[]

Returns the list of keywords.

method Doctrine\DBAL\Platforms\Keywords\PostgreSQLKeywords::isKeyword ($word) : bool

Checks if the given word is a keyword of this dialect/vendor platform.

method Doctrine\DBAL\Platforms\Keywords\PostgreSQLKeywords::initializeKeywords () : void

class Doctrine\DBAL\Platforms\Keywords::PostgreSQL91Keywords

PostgreSQL 9.1 reserved keywords list.

method Doctrine\DBAL\Platforms\Keywords\PostgreSQL91Keywords::getName () : string

Returns the name of this keyword list.

method Doctrine\DBAL\Platforms\Keywords\PostgreSQL91Keywords::getKeywords () : string[]

Returns the list of keywords.

method Doctrine\DBAL\Platforms\Keywords\PostgreSQL91Keywords::isKeyword ($word) : bool

Checks if the given word is a keyword of this dialect/vendor platform.

method Doctrine\DBAL\Platforms\Keywords\PostgreSQL91Keywords::initializeKeywords () : void

class Doctrine\DBAL\Platforms\Keywords::PostgreSQL92Keywords

PostgreSQL 9.2 reserved keywords list.

method Doctrine\DBAL\Platforms\Keywords\PostgreSQL92Keywords::getName () : string

Returns the name of this keyword list.

method Doctrine\DBAL\Platforms\Keywords\PostgreSQL92Keywords::getKeywords () : string[]

Returns the list of keywords.

method Doctrine\DBAL\Platforms\Keywords\PostgreSQL92Keywords::isKeyword ($word) : bool

Checks if the given word is a keyword of this dialect/vendor platform.

method Doctrine\DBAL\Platforms\Keywords\PostgreSQL92Keywords::initializeKeywords () : void

class Doctrine\DBAL\Platforms\Keywords::PostgreSQL94Keywords

PostgreSQL 9.4 reserved keywords list.

method Doctrine\DBAL\Platforms\Keywords\PostgreSQL94Keywords::getName () : string

Returns the name of this keyword list.

method Doctrine\DBAL\Platforms\Keywords\PostgreSQL94Keywords::getKeywords () : string[]

Returns the list of keywords.

method Doctrine\DBAL\Platforms\Keywords\PostgreSQL94Keywords::isKeyword ($word) : bool

Checks if the given word is a keyword of this dialect/vendor platform.

method Doctrine\DBAL\Platforms\Keywords\PostgreSQL94Keywords::initializeKeywords () : void

class Doctrine\DBAL\Platforms\Keywords::PostgreSQL100Keywords

PostgreSQL 10.0 reserved keywords list.

method Doctrine\DBAL\Platforms\Keywords\PostgreSQL100Keywords::getName () : string

Returns the name of this keyword list.

method Doctrine\DBAL\Platforms\Keywords\PostgreSQL100Keywords::getKeywords () : string[]

Returns the list of keywords.

method Doctrine\DBAL\Platforms\Keywords\PostgreSQL100Keywords::isKeyword ($word) : bool

Checks if the given word is a keyword of this dialect/vendor platform.

method Doctrine\DBAL\Platforms\Keywords\PostgreSQL100Keywords::initializeKeywords () : void

class Doctrine\DBAL\Platforms::AbstractPlatform

Base class for all DatabasePlatforms. The DatabasePlatforms are the central
point of abstraction of platform-specific behaviors, features and SQL dialects.
They are a passive source of information.

classconstant integer Doctrine\DBAL\Platforms\AbstractPlatform::CREATE_INDEXES

classconstant integer Doctrine\DBAL\Platforms\AbstractPlatform::CREATE_FOREIGNKEYS

classconstant string Doctrine\DBAL\Platforms\AbstractPlatform::DATE_INTERVAL_UNIT_SECOND

classconstant string Doctrine\DBAL\Platforms\AbstractPlatform::DATE_INTERVAL_UNIT_MINUTE

classconstant string Doctrine\DBAL\Platforms\AbstractPlatform::DATE_INTERVAL_UNIT_HOUR

classconstant string Doctrine\DBAL\Platforms\AbstractPlatform::DATE_INTERVAL_UNIT_DAY

classconstant string Doctrine\DBAL\Platforms\AbstractPlatform::DATE_INTERVAL_UNIT_WEEK

classconstant string Doctrine\DBAL\Platforms\AbstractPlatform::DATE_INTERVAL_UNIT_MONTH

classconstant string Doctrine\DBAL\Platforms\AbstractPlatform::DATE_INTERVAL_UNIT_QUARTER

classconstant string Doctrine\DBAL\Platforms\AbstractPlatform::DATE_INTERVAL_UNIT_YEAR

classconstant integer Doctrine\DBAL\Platforms\AbstractPlatform::TRIM_UNSPECIFIED

classconstant integer Doctrine\DBAL\Platforms\AbstractPlatform::TRIM_LEADING

classconstant integer Doctrine\DBAL\Platforms\AbstractPlatform::TRIM_TRAILING

classconstant integer Doctrine\DBAL\Platforms\AbstractPlatform::TRIM_BOTH

property string[]null Doctrine\DBAL\Platforms\AbstractPlatform::doctrineTypeMapping

property string[]null Doctrine\DBAL\Platforms\AbstractPlatform::doctrineTypeComments

Contains a list of all columns that should generate parseable column comments for type-detection
in reverse engineering scenarios.

property Doctrine\Common\EventManager Doctrine\DBAL\Platforms\AbstractPlatform::_eventManager

property Doctrine\DBAL\Platforms\Keywords\KeywordListnull Doctrine\DBAL\Platforms\AbstractPlatform::_keywords

Holds the KeywordList instance for the current platform.

method Doctrine\DBAL\Platforms\AbstractPlatform::__construct () : void

method Doctrine\DBAL\Platforms\AbstractPlatform::setEventManager ($eventManager) : void

Sets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\AbstractPlatform::getEventManager () : Doctrine\Common\EventManager

Gets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\AbstractPlatform::getBooleanTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a boolean column.

method Doctrine\DBAL\Platforms\AbstractPlatform::getIntegerTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a 4 byte integer column.

method Doctrine\DBAL\Platforms\AbstractPlatform::getBigIntTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares an 8 byte integer column.

method Doctrine\DBAL\Platforms\AbstractPlatform::getSmallIntTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a 2 byte integer column.

method Doctrine\DBAL\Platforms\AbstractPlatform::_getCommonIntegerTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares common properties of an integer column.

method Doctrine\DBAL\Platforms\AbstractPlatform::initializeDoctrineTypeMappings () : void

Lazy load Doctrine Type Mappings.

method Doctrine\DBAL\Platforms\AbstractPlatform::getVarcharTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a VARCHAR column type.

method Doctrine\DBAL\Platforms\AbstractPlatform::getBinaryTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\AbstractPlatform::getGuidTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a GUID/UUID field.

By default this maps directly to a CHAR(36) and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\AbstractPlatform::getJsonTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a JSON field.

By default this maps directly to a CLOB and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\AbstractPlatform::getVarcharTypeDeclarationSQLSnippet ($length, $fixed) : string

method Doctrine\DBAL\Platforms\AbstractPlatform::getBinaryTypeDeclarationSQLSnippet ($length, $fixed) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\AbstractPlatform::getClobTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a CLOB column type.

method Doctrine\DBAL\Platforms\AbstractPlatform::getBlobTypeDeclarationSQL ($field) : string

Returns the SQL Snippet used to declare a BLOB column type.

method Doctrine\DBAL\Platforms\AbstractPlatform::getName () : string

Gets the name of the platform.

method Doctrine\DBAL\Platforms\AbstractPlatform::registerDoctrineTypeMapping ($dbType, $doctrineType) : void

Registers a doctrine type to be used in conjunction with a column type of this platform.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDoctrineTypeMapping ($dbType) : string

Gets the Doctrine type that is mapped for the given database column type.

method Doctrine\DBAL\Platforms\AbstractPlatform::hasDoctrineTypeMappingFor ($dbType) : bool

Checks if a database type is currently supported by this platform.

method Doctrine\DBAL\Platforms\AbstractPlatform::initializeCommentedDoctrineTypes () : void

Initializes the Doctrine Type comments instance variable for in_array() checks.

method Doctrine\DBAL\Platforms\AbstractPlatform::isCommentedDoctrineType ($doctrineType) : bool

Is it necessary for the platform to add a parsable type comment to allow reverse engineering the given type?

method Doctrine\DBAL\Platforms\AbstractPlatform::markDoctrineTypeCommented ($doctrineType) : void

Marks this type as to be commented in ALTER TABLE and CREATE TABLE statements.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDoctrineTypeComment ($doctrineType) : string

Gets the comment to append to a column comment that helps parsing this type in reverse engineering.

method Doctrine\DBAL\Platforms\AbstractPlatform::getColumnComment ($column) : stringnull

Gets the comment of a passed column modified by potential doctrine type comment hints.

method Doctrine\DBAL\Platforms\AbstractPlatform::getIdentifierQuoteCharacter () : string

Gets the character used for identifier quoting.

method Doctrine\DBAL\Platforms\AbstractPlatform::getSqlCommentStartString () : string

Gets the string portion that starts an SQL comment.

method Doctrine\DBAL\Platforms\AbstractPlatform::getSqlCommentEndString () : string

Gets the string portion that ends an SQL comment.

method Doctrine\DBAL\Platforms\AbstractPlatform::getCharMaxLength () : int

Gets the maximum length of a char field.

method Doctrine\DBAL\Platforms\AbstractPlatform::getVarcharMaxLength () : int

Gets the maximum length of a varchar field.

method Doctrine\DBAL\Platforms\AbstractPlatform::getVarcharDefaultLength () : int

Gets the default length of a varchar field.

method Doctrine\DBAL\Platforms\AbstractPlatform::getBinaryMaxLength () : int

Gets the maximum length of a binary field.

method Doctrine\DBAL\Platforms\AbstractPlatform::getBinaryDefaultLength () : int

Gets the default length of a binary field.

method Doctrine\DBAL\Platforms\AbstractPlatform::getWildcards () : string[]

Gets all SQL wildcard characters of the platform.

method Doctrine\DBAL\Platforms\AbstractPlatform::getRegexpExpression () : string

Returns the regular expression operator.

method Doctrine\DBAL\Platforms\AbstractPlatform::getGuidExpression () : string

Returns the global unique identifier expression.

method Doctrine\DBAL\Platforms\AbstractPlatform::getAvgExpression ($column) : string

Returns the SQL snippet to get the average value of a column.

method Doctrine\DBAL\Platforms\AbstractPlatform::getCountExpression ($column) : string

Returns the SQL snippet to get the number of rows (without a NULL value) of a column.

If a '*' is used instead of a column the number of selected rows is returned.

method Doctrine\DBAL\Platforms\AbstractPlatform::getMaxExpression ($column) : string

Returns the SQL snippet to get the highest value of a column.

method Doctrine\DBAL\Platforms\AbstractPlatform::getMinExpression ($column) : string

Returns the SQL snippet to get the lowest value of a column.

method Doctrine\DBAL\Platforms\AbstractPlatform::getSumExpression ($column) : string

Returns the SQL snippet to get the total sum of a column.

method Doctrine\DBAL\Platforms\AbstractPlatform::getMd5Expression ($column) : string

Returns the SQL snippet to get the md5 sum of a field.

Note: Not SQL92, but common functionality.

method Doctrine\DBAL\Platforms\AbstractPlatform::getLengthExpression ($column) : string

Returns the SQL snippet to get the length of a text field.

method Doctrine\DBAL\Platforms\AbstractPlatform::getSqrtExpression ($column) : string

Returns the SQL snippet to get the squared value of a column.

method Doctrine\DBAL\Platforms\AbstractPlatform::getRoundExpression ($column, $decimals = 0) : string

Returns the SQL snippet to round a numeric field to the number of decimals specified.

method Doctrine\DBAL\Platforms\AbstractPlatform::getModExpression ($expression1, $expression2) : string

Returns the SQL snippet to get the remainder of the division operation $expression1 / $expression2.

method Doctrine\DBAL\Platforms\AbstractPlatform::getTrimExpression ($str, $mode = Doctrine\DBAL\Platforms\TrimMode::UNSPECIFIED, $char = false) : string

Returns the SQL snippet to trim a string.

method Doctrine\DBAL\Platforms\AbstractPlatform::getRtrimExpression ($str) : string

Returns the SQL snippet to trim trailing space characters from the expression.

method Doctrine\DBAL\Platforms\AbstractPlatform::getLtrimExpression ($str) : string

Returns the SQL snippet to trim leading space characters from the expression.

method Doctrine\DBAL\Platforms\AbstractPlatform::getUpperExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to uppercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\AbstractPlatform::getLowerExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to lowercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\AbstractPlatform::getLocateExpression ($str, $substr, $startPos = false) : string

Returns the SQL snippet to get the position of the first occurrence of substring $substr in string $str.

method Doctrine\DBAL\Platforms\AbstractPlatform::getNowExpression () : string

Returns the SQL snippet to get the current system date.

method Doctrine\DBAL\Platforms\AbstractPlatform::getSubstringExpression ($value, $from, $length = null) : string

Returns a SQL snippet to get a substring inside an SQL statement.

Note: Not SQL92, but common functionality.

SQLite only supports the 2 parameter variant of this function.

method Doctrine\DBAL\Platforms\AbstractPlatform::getConcatExpression () : string

Returns a SQL snippet to concatenate the given expressions.

Accepts an arbitrary number of string parameters. Each parameter must contain an expression.

method Doctrine\DBAL\Platforms\AbstractPlatform::getNotExpression ($expression) : string

Returns the SQL for a logical not.

Example:

$q = new Doctrine_Query();
$e = $q->expr;
$q->select('*')->from('table')
->where($e->eq('id', $e->not('null'));

method Doctrine\DBAL\Platforms\AbstractPlatform::getIsNullExpression ($expression) : string

Returns the SQL that checks if an expression is null.

method Doctrine\DBAL\Platforms\AbstractPlatform::getIsNotNullExpression ($expression) : string

Returns the SQL that checks if an expression is not null.

method Doctrine\DBAL\Platforms\AbstractPlatform::getBetweenExpression ($expression, $value1, $value2) : string

Returns the SQL that checks if an expression evaluates to a value between two values.

The parameter $expression is checked if it is between $value1 and $value2.

Note: There is a slight difference in the way BETWEEN works on some databases.
http://www.w3schools.com/sql/sql_between.asp. If you want complete database
independence you should avoid using between().

method Doctrine\DBAL\Platforms\AbstractPlatform::getAcosExpression ($value) : string

Returns the SQL to get the arccosine of a value.

method Doctrine\DBAL\Platforms\AbstractPlatform::getSinExpression ($value) : string

Returns the SQL to get the sine of a value.

method Doctrine\DBAL\Platforms\AbstractPlatform::getPiExpression () : string

Returns the SQL to get the PI value.

method Doctrine\DBAL\Platforms\AbstractPlatform::getCosExpression ($value) : string

Returns the SQL to get the cosine of a value.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDateDiffExpression ($date1, $date2) : string

Returns the SQL to calculate the difference in days between the two passed dates.

Computes diff = date1 - date2.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDateAddSecondsExpression ($date, $seconds) : string

Returns the SQL to add the number of given seconds to a date.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDateSubSecondsExpression ($date, $seconds) : string

Returns the SQL to subtract the number of given seconds from a date.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDateAddMinutesExpression ($date, $minutes) : string

Returns the SQL to add the number of given minutes to a date.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDateSubMinutesExpression ($date, $minutes) : string

Returns the SQL to subtract the number of given minutes from a date.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDateAddHourExpression ($date, $hours) : string

Returns the SQL to add the number of given hours to a date.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDateSubHourExpression ($date, $hours) : string

Returns the SQL to subtract the number of given hours to a date.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDateAddDaysExpression ($date, $days) : string

Returns the SQL to add the number of given days to a date.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDateSubDaysExpression ($date, $days) : string

Returns the SQL to subtract the number of given days to a date.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDateAddWeeksExpression ($date, $weeks) : string

Returns the SQL to add the number of given weeks to a date.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDateSubWeeksExpression ($date, $weeks) : string

Returns the SQL to subtract the number of given weeks from a date.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDateAddMonthExpression ($date, $months) : string

Returns the SQL to add the number of given months to a date.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDateSubMonthExpression ($date, $months) : string

Returns the SQL to subtract the number of given months to a date.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDateAddQuartersExpression ($date, $quarters) : string

Returns the SQL to add the number of given quarters to a date.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDateSubQuartersExpression ($date, $quarters) : string

Returns the SQL to subtract the number of given quarters from a date.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDateAddYearsExpression ($date, $years) : string

Returns the SQL to add the number of given years to a date.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDateSubYearsExpression ($date, $years) : string

Returns the SQL to subtract the number of given years from a date.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDateArithmeticIntervalExpression ($date, $operator, $interval, $unit) : string

Returns the SQL for a date arithmetic expression.

method Doctrine\DBAL\Platforms\AbstractPlatform::getBitAndComparisonExpression ($value1, $value2) : string

Returns the SQL bit AND comparison expression.

method Doctrine\DBAL\Platforms\AbstractPlatform::getBitOrComparisonExpression ($value1, $value2) : string

Returns the SQL bit OR comparison expression.

method Doctrine\DBAL\Platforms\AbstractPlatform::getForUpdateSQL () : string

Returns the FOR UPDATE expression.

method Doctrine\DBAL\Platforms\AbstractPlatform::appendLockHint ($fromClause, $lockMode) : string

Honors that some SQL vendors such as MsSql use table hints for locking instead of the ANSI SQL FOR UPDATE specification.

method Doctrine\DBAL\Platforms\AbstractPlatform::getReadLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which locks rows in shared read lock.

This defaults to the ANSI SQL "FOR UPDATE", which is an exclusive lock (Write). Some database
vendors allow to lighten this constraint up to be a real read lock.

method Doctrine\DBAL\Platforms\AbstractPlatform::getWriteLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which obtains an exclusive lock on the rows.

The semantics of this lock mode should equal the SELECT .. FOR UPDATE of the ANSI SQL standard.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDropDatabaseSQL ($database) : string

Returns the SQL snippet to drop an existing database.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDropTableSQL ($table) : string

Returns the SQL snippet to drop an existing table.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDropTemporaryTableSQL ($table) : string

Returns the SQL to safely drop a temporary table WITHOUT implicitly committing an open transaction.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDropIndexSQL ($index, $table = null) : string

Returns the SQL to drop an index from a table.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDropConstraintSQL ($constraint, $table) : string

Returns the SQL to drop a constraint.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDropForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to drop a foreign key.

method Doctrine\DBAL\Platforms\AbstractPlatform::getCreateTableSQL ($table, $createFlags = self::CREATE_INDEXES) : string[]

Returns the SQL statement(s) to create a table with the specified name, columns and constraints
on this platform.

method Doctrine\DBAL\Platforms\AbstractPlatform::getCommentOnTableSQL ($tableName, $comment) : string

method Doctrine\DBAL\Platforms\AbstractPlatform::getCommentOnColumnSQL ($tableName, $columnName, $comment) : string

method Doctrine\DBAL\Platforms\AbstractPlatform::getInlineColumnCommentSQL ($comment) : string

Returns the SQL to create inline comment on a column.

method Doctrine\DBAL\Platforms\AbstractPlatform::_getCreateTableSQL ($tableName, $columns, $options = []) : string[]

Returns the SQL used to create a table.

method Doctrine\DBAL\Platforms\AbstractPlatform::getCreateTemporaryTableSnippetSQL () : string

method Doctrine\DBAL\Platforms\AbstractPlatform::getCreateSequenceSQL ($sequence) : string

Returns the SQL to create a sequence on this platform.

method Doctrine\DBAL\Platforms\AbstractPlatform::getAlterSequenceSQL ($sequence) : string

Returns the SQL to change a sequence on this platform.

method Doctrine\DBAL\Platforms\AbstractPlatform::getCreateConstraintSQL ($constraint, $table) : string

Returns the SQL to create a constraint on a table on this platform.

method Doctrine\DBAL\Platforms\AbstractPlatform::getCreateIndexSQL ($index, $table) : string

Returns the SQL to create an index on a table on this platform.

method Doctrine\DBAL\Platforms\AbstractPlatform::getPartialIndexSQL ($index) : string

Adds condition for partial index.

method Doctrine\DBAL\Platforms\AbstractPlatform::getCreateIndexSQLFlags ($index) : string

Adds additional flags for index generation.

method Doctrine\DBAL\Platforms\AbstractPlatform::getCreatePrimaryKeySQL ($index, $table) : string

Returns the SQL to create an unnamed primary key constraint.

method Doctrine\DBAL\Platforms\AbstractPlatform::getCreateSchemaSQL ($schemaName) : string

Returns the SQL to create a named schema.

method Doctrine\DBAL\Platforms\AbstractPlatform::quoteIdentifier ($str) : string

Quotes a string so that it can be safely used as a table or column name,
even if it is a reserved word of the platform. This also detects identifier
chains separated by dot and quotes them independently.

NOTE: Just because you CAN use quoted identifiers doesn't mean
you SHOULD use them. In general, they end up causing way more
problems than they solve.

method Doctrine\DBAL\Platforms\AbstractPlatform::quoteSingleIdentifier ($str) : string

Quotes a single identifier (no dot chain separation).

method Doctrine\DBAL\Platforms\AbstractPlatform::getCreateForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to create a new foreign key.

method Doctrine\DBAL\Platforms\AbstractPlatform::getAlterTableSQL ($diff) : string[]

Gets the SQL statements for altering an existing table.

This method returns an array of SQL statements, since some platforms need several statements.

method Doctrine\DBAL\Platforms\AbstractPlatform::onSchemaAlterTableAddColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\AbstractPlatform::onSchemaAlterTableRemoveColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\AbstractPlatform::onSchemaAlterTableChangeColumn ($columnDiff, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\AbstractPlatform::onSchemaAlterTableRenameColumn ($oldColumnName, $column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\AbstractPlatform::onSchemaAlterTable ($diff, &$sql) : bool

method Doctrine\DBAL\Platforms\AbstractPlatform::getPreAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\AbstractPlatform::getPostAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\AbstractPlatform::getRenameIndexSQL ($oldIndexName, $index, $tableName) : string[]

Returns the SQL for renaming an index on a table.

method Doctrine\DBAL\Platforms\AbstractPlatform::_getAlterTableIndexForeignKeySQL ($diff) : string[]

Common code for alter table statement generation that updates the changed Index and Foreign Key definitions.

method Doctrine\DBAL\Platforms\AbstractPlatform::getColumnDeclarationListSQL ($fields) : string

Gets declaration of a number of fields in bulk.

method Doctrine\DBAL\Platforms\AbstractPlatform::getColumnDeclarationSQL ($name, $field) : string

Obtains DBMS specific SQL code portion needed to declare a generic type
field to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDecimalTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a floating point column of arbitrary precision.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDefaultValueDeclarationSQL ($field) : string

Obtains DBMS specific SQL code portion needed to set a default value
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\AbstractPlatform::getCheckDeclarationSQL ($definition) : string

Obtains DBMS specific SQL code portion needed to set a CHECK constraint
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\AbstractPlatform::getUniqueConstraintDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set a unique
constraint declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\AbstractPlatform::getIndexDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\AbstractPlatform::getCustomTypeDeclarationSQL ($columnDef) : string

Obtains SQL code portion needed to create a custom column,
e.g. when a field has the "columnDefinition" keyword.
Only "AUTOINCREMENT" and "PRIMARY KEY" are added if appropriate.

method Doctrine\DBAL\Platforms\AbstractPlatform::getIndexFieldDeclarationListSQL ($columnsOrIndex) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\AbstractPlatform::getTemporaryTableSQL () : string

Returns the required SQL string that fits between CREATE ... TABLE
to create the table as a temporary table.

Should be overridden in driver classes to return the correct string for the
specific database type.

The default is to return the string "TEMPORARY" - this will result in a
SQL error for any database that does not support temporary tables, or that
requires a different SQL command from "CREATE TEMPORARY TABLE".

method Doctrine\DBAL\Platforms\AbstractPlatform::getTemporaryTableName ($tableName) : string

Some vendors require temporary table names to be qualified specially.

method Doctrine\DBAL\Platforms\AbstractPlatform::getForeignKeyDeclarationSQL ($foreignKey) : string

Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\AbstractPlatform::getAdvancedForeignKeyOptionsSQL ($foreignKey) : string

Returns the FOREIGN KEY query section dealing with non-standard options
as MATCH, INITIALLY DEFERRED, ON UPDATE, ...

method Doctrine\DBAL\Platforms\AbstractPlatform::getForeignKeyReferentialActionSQL ($action) : string

Returns the given referential action in uppercase if valid, otherwise throws an exception.

method Doctrine\DBAL\Platforms\AbstractPlatform::getForeignKeyBaseDeclarationSQL ($foreignKey) : string

Obtains DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\AbstractPlatform::getUniqueFieldDeclarationSQL () : string

Obtains DBMS specific SQL code portion needed to set the UNIQUE constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\AbstractPlatform::getColumnCharsetDeclarationSQL ($charset) : string

Obtains DBMS specific SQL code portion needed to set the CHARACTER SET
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\AbstractPlatform::getColumnCollationDeclarationSQL ($collation) : string

Obtains DBMS specific SQL code portion needed to set the COLLATION
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\AbstractPlatform::prefersSequences () : bool

Whether the platform prefers sequences for ID generation.
Subclasses should override this method to return TRUE if they prefer sequences.

method Doctrine\DBAL\Platforms\AbstractPlatform::prefersIdentityColumns () : bool

Whether the platform prefers identity columns (eg. autoincrement) for ID generation.
Subclasses should override this method to return TRUE if they prefer identity columns.

method Doctrine\DBAL\Platforms\AbstractPlatform::convertBooleans ($item) : mixed

Some platforms need the boolean values to be converted.

The default conversion in this implementation converts to integers (false => 0, true => 1).

Note: if the input is not a boolean the original input might be returned.

There are two contexts when converting booleans: Literals and Prepared Statements.
This method should handle the literal case

method Doctrine\DBAL\Platforms\AbstractPlatform::convertFromBoolean ($item) : boolnull

Some platforms have boolean literals that needs to be correctly converted

The default conversion tries to convert value into bool "(bool)$item"

method Doctrine\DBAL\Platforms\AbstractPlatform::convertBooleansToDatabaseValue ($item) : mixed

This method should handle the prepared statements case. When there is no
distinction, it's OK to use the same method.

Note: if the input is not a boolean the original input might be returned.

method Doctrine\DBAL\Platforms\AbstractPlatform::getCurrentDateSQL () : string

Returns the SQL specific for the platform to get the current date.

method Doctrine\DBAL\Platforms\AbstractPlatform::getCurrentTimeSQL () : string

Returns the SQL specific for the platform to get the current time.

method Doctrine\DBAL\Platforms\AbstractPlatform::getCurrentTimestampSQL () : string

Returns the SQL specific for the platform to get the current timestamp

method Doctrine\DBAL\Platforms\AbstractPlatform::_getTransactionIsolationLevelSQL ($level) : string

Returns the SQL for a given transaction isolation level Connection constant.

method Doctrine\DBAL\Platforms\AbstractPlatform::getListDatabasesSQL () : string

method Doctrine\DBAL\Platforms\AbstractPlatform::getListNamespacesSQL () : string

Returns the SQL statement for retrieving the namespaces defined in the database.

method Doctrine\DBAL\Platforms\AbstractPlatform::getListSequencesSQL ($database) : string

method Doctrine\DBAL\Platforms\AbstractPlatform::getListTableConstraintsSQL ($table) : string

method Doctrine\DBAL\Platforms\AbstractPlatform::getListTableColumnsSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\AbstractPlatform::getListTablesSQL () : string

method Doctrine\DBAL\Platforms\AbstractPlatform::getListUsersSQL () : string

method Doctrine\DBAL\Platforms\AbstractPlatform::getListViewsSQL ($database) : string

Returns the SQL to list all views of a database or user.

method Doctrine\DBAL\Platforms\AbstractPlatform::getListTableIndexesSQL ($table, $currentDatabase = null) : string

Returns the list of indexes for the current database.

The current database parameter is optional but will always be passed
when using the SchemaManager API and is the database the given table is in.

Attention: Some platforms only support currentDatabase when they
are connected with that database. Cross-database information schema
requests may be impossible.

method Doctrine\DBAL\Platforms\AbstractPlatform::getListTableForeignKeysSQL ($table) : string

method Doctrine\DBAL\Platforms\AbstractPlatform::getCreateViewSQL ($name, $sql) : string

method Doctrine\DBAL\Platforms\AbstractPlatform::getDropViewSQL ($name) : string

method Doctrine\DBAL\Platforms\AbstractPlatform::getDropSequenceSQL ($sequence) : string

Returns the SQL snippet to drop an existing sequence.

method Doctrine\DBAL\Platforms\AbstractPlatform::getSequenceNextValSQL ($sequenceName) : string

method Doctrine\DBAL\Platforms\AbstractPlatform::getCreateDatabaseSQL ($database) : string

Returns the SQL to create a new database.

method Doctrine\DBAL\Platforms\AbstractPlatform::getSetTransactionIsolationSQL ($level) : string

Returns the SQL to set the transaction isolation level.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDateTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime fields in
statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDateTimeTzTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime with timezone offset fields.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDateTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create date fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\AbstractPlatform::getTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create time fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\AbstractPlatform::getFloatDeclarationSQL ($fieldDeclaration) : string

method Doctrine\DBAL\Platforms\AbstractPlatform::getDefaultTransactionIsolationLevel () : int

Gets the default transaction isolation level of the platform.

method Doctrine\DBAL\Platforms\AbstractPlatform::supportsSequences () : bool

Whether the platform supports sequences.

method Doctrine\DBAL\Platforms\AbstractPlatform::supportsIdentityColumns () : bool

Whether the platform supports identity columns.

Identity columns are columns that receive an auto-generated value from the
database on insert of a row.

method Doctrine\DBAL\Platforms\AbstractPlatform::usesSequenceEmulatedIdentityColumns () : bool

Whether the platform emulates identity columns through sequences.

Some platforms that do not support identity columns natively
but support sequences can emulate identity columns by using
sequences.

method Doctrine\DBAL\Platforms\AbstractPlatform::getIdentitySequenceName ($tableName, $columnName) : string

Returns the name of the sequence for a particular identity column in a particular table.

method Doctrine\DBAL\Platforms\AbstractPlatform::supportsIndexes () : bool

Whether the platform supports indexes.

method Doctrine\DBAL\Platforms\AbstractPlatform::supportsPartialIndexes () : bool

Whether the platform supports partial indexes.

method Doctrine\DBAL\Platforms\AbstractPlatform::supportsColumnLengthIndexes () : bool

Whether the platform supports indexes with column length definitions.

method Doctrine\DBAL\Platforms\AbstractPlatform::supportsAlterTable () : bool

Whether the platform supports altering tables.

method Doctrine\DBAL\Platforms\AbstractPlatform::supportsTransactions () : bool

Whether the platform supports transactions.

method Doctrine\DBAL\Platforms\AbstractPlatform::supportsSavepoints () : bool

Whether the platform supports savepoints.

method Doctrine\DBAL\Platforms\AbstractPlatform::supportsReleaseSavepoints () : bool

Whether the platform supports releasing savepoints.

method Doctrine\DBAL\Platforms\AbstractPlatform::supportsPrimaryConstraints () : bool

Whether the platform supports primary key constraints.

method Doctrine\DBAL\Platforms\AbstractPlatform::supportsForeignKeyConstraints () : bool

Whether the platform supports foreign key constraints.

method Doctrine\DBAL\Platforms\AbstractPlatform::supportsForeignKeyOnUpdate () : bool

Whether this platform supports onUpdate in foreign key constraints.

method Doctrine\DBAL\Platforms\AbstractPlatform::supportsSchemas () : bool

Whether the platform supports database schemas.

method Doctrine\DBAL\Platforms\AbstractPlatform::canEmulateSchemas () : bool

Whether this platform can emulate schemas.

Platforms that either support or emulate schemas don't automatically
filter a schema for the namespaced elements in {@link
AbstractManager#createSchema}.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDefaultSchemaName () : string

Returns the default schema name.

method Doctrine\DBAL\Platforms\AbstractPlatform::supportsCreateDropDatabase () : bool

Whether this platform supports create database.

Some databases don't allow to create and drop databases at all or only with certain tools.

method Doctrine\DBAL\Platforms\AbstractPlatform::supportsGettingAffectedRows () : bool

Whether the platform supports getting the affected rows of a recent update/delete type query.

method Doctrine\DBAL\Platforms\AbstractPlatform::supportsInlineColumnComments () : bool

Whether this platform support to add inline column comments as postfix.

method Doctrine\DBAL\Platforms\AbstractPlatform::supportsCommentOnStatement () : bool

Whether this platform support the proprietary syntax "COMMENT ON asset".

method Doctrine\DBAL\Platforms\AbstractPlatform::hasNativeGuidType () : bool

Does this platform have native guid type.

method Doctrine\DBAL\Platforms\AbstractPlatform::hasNativeJsonType () : bool

Does this platform have native JSON type.

method Doctrine\DBAL\Platforms\AbstractPlatform::getIdentityColumnNullInsertSQL () : void

method Doctrine\DBAL\Platforms\AbstractPlatform::supportsViews () : bool

Whether this platform supports views.

method Doctrine\DBAL\Platforms\AbstractPlatform::supportsColumnCollation () : bool

Does this platform support column collation?

method Doctrine\DBAL\Platforms\AbstractPlatform::getDateTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime value of this platform.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDateTimeTzFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime with timezone value of this platform.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDateFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored date value of this platform.

method Doctrine\DBAL\Platforms\AbstractPlatform::getTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored time value of this platform.

method Doctrine\DBAL\Platforms\AbstractPlatform::modifyLimitQuery ($query, $limit, $offset = null) : string

Adds an driver-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\AbstractPlatform::doModifyLimitQuery ($query, $limit, $offset) : string

Adds an platform-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\AbstractPlatform::supportsLimitOffset () : bool

Whether the database platform support offsets in modify limit clauses.

method Doctrine\DBAL\Platforms\AbstractPlatform::getSQLResultCasing ($column) : string

Gets the character casing of a column in an SQL result set of this platform.

method Doctrine\DBAL\Platforms\AbstractPlatform::fixSchemaElementName ($schemaElementName) : string

Makes any fixes to a name of a schema element (table, sequence, ...) that are required
by restrictions of the platform, like a maximum length.

method Doctrine\DBAL\Platforms\AbstractPlatform::getMaxIdentifierLength () : int

Maximum length of any given database identifier, like tables or column names.

method Doctrine\DBAL\Platforms\AbstractPlatform::getEmptyIdentityInsertSQL ($tableName, $identifierColumnName) : string

Returns the insert SQL for an empty insert statement.

method Doctrine\DBAL\Platforms\AbstractPlatform::getTruncateTableSQL ($tableName, $cascade = false) : string

Generates a Truncate Table SQL statement for a given table.

Cascade is not supported on many platforms but would optionally cascade the truncate by
following the foreign keys.

method Doctrine\DBAL\Platforms\AbstractPlatform::getDummySelectSQL () : string

This is for test reasons, many vendors have special requirements for dummy statements.

method Doctrine\DBAL\Platforms\AbstractPlatform::createSavePoint ($savepoint) : string

Returns the SQL to create a new savepoint.

method Doctrine\DBAL\Platforms\AbstractPlatform::releaseSavePoint ($savepoint) : string

Returns the SQL to release a savepoint.

method Doctrine\DBAL\Platforms\AbstractPlatform::rollbackSavePoint ($savepoint) : string

Returns the SQL to rollback a savepoint.

method Doctrine\DBAL\Platforms\AbstractPlatform::getReservedKeywordsList () : Doctrine\DBAL\Platforms\Keywords\KeywordList

Returns the keyword list instance of this platform.

method Doctrine\DBAL\Platforms\AbstractPlatform::getReservedKeywordsClass () : string

Returns the class name of the reserved keywords list.

method Doctrine\DBAL\Platforms\AbstractPlatform::quoteStringLiteral ($str) : string

Quotes a literal string.
This method is NOT meant to fix SQL injections!
It is only meant to escape this platform's string literal
quote character inside the given literal string.

method Doctrine\DBAL\Platforms\AbstractPlatform::getStringLiteralQuoteCharacter () : string

Gets the character used for string literal quoting.

method Doctrine\DBAL\Platforms\AbstractPlatform::escapeStringForLike ($inputString, $escapeChar) : string

Escapes metacharacters in a string intended to be used with a LIKE
operator.

method Doctrine\DBAL\Platforms\AbstractPlatform::getLikeWildcardCharacters () : string

class Doctrine\DBAL\Platforms::DrizzlePlatform

Drizzle platform

classconstant integer Doctrine\DBAL\Platforms\DrizzlePlatform::CREATE_INDEXES

classconstant integer Doctrine\DBAL\Platforms\DrizzlePlatform::CREATE_FOREIGNKEYS

classconstant string Doctrine\DBAL\Platforms\DrizzlePlatform::DATE_INTERVAL_UNIT_SECOND

classconstant string Doctrine\DBAL\Platforms\DrizzlePlatform::DATE_INTERVAL_UNIT_MINUTE

classconstant string Doctrine\DBAL\Platforms\DrizzlePlatform::DATE_INTERVAL_UNIT_HOUR

classconstant string Doctrine\DBAL\Platforms\DrizzlePlatform::DATE_INTERVAL_UNIT_DAY

classconstant string Doctrine\DBAL\Platforms\DrizzlePlatform::DATE_INTERVAL_UNIT_WEEK

classconstant string Doctrine\DBAL\Platforms\DrizzlePlatform::DATE_INTERVAL_UNIT_MONTH

classconstant string Doctrine\DBAL\Platforms\DrizzlePlatform::DATE_INTERVAL_UNIT_QUARTER

classconstant string Doctrine\DBAL\Platforms\DrizzlePlatform::DATE_INTERVAL_UNIT_YEAR

classconstant integer Doctrine\DBAL\Platforms\DrizzlePlatform::TRIM_UNSPECIFIED

classconstant integer Doctrine\DBAL\Platforms\DrizzlePlatform::TRIM_LEADING

classconstant integer Doctrine\DBAL\Platforms\DrizzlePlatform::TRIM_TRAILING

classconstant integer Doctrine\DBAL\Platforms\DrizzlePlatform::TRIM_BOTH

property string[]null Doctrine\DBAL\Platforms\DrizzlePlatform::doctrineTypeMapping

property string[]null Doctrine\DBAL\Platforms\DrizzlePlatform::doctrineTypeComments

Contains a list of all columns that should generate parseable column comments for type-detection
in reverse engineering scenarios.

property Doctrine\Common\EventManager Doctrine\DBAL\Platforms\DrizzlePlatform::_eventManager

property Doctrine\DBAL\Platforms\Keywords\KeywordListnull Doctrine\DBAL\Platforms\DrizzlePlatform::_keywords

Holds the KeywordList instance for the current platform.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getName () : string

Gets the name of the platform.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getIdentifierQuoteCharacter () : string

Gets the character used for identifier quoting.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getConcatExpression () : string

Returns a SQL snippet to concatenate the given expressions.

Accepts an arbitrary number of string parameters. Each parameter must contain an expression.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDateArithmeticIntervalExpression ($date, $operator, $interval, $unit) : string

Returns the SQL for a date arithmetic expression.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDateDiffExpression ($date1, $date2) : string

Returns the SQL to calculate the difference in days between the two passed dates.

Computes diff = date1 - date2.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getBooleanTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a boolean column.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getIntegerTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a 4 byte integer column.

method Doctrine\DBAL\Platforms\DrizzlePlatform::_getCommonIntegerTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares common properties of an integer column.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getBigIntTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares an 8 byte integer column.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getSmallIntTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a 2 byte integer column.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getVarcharTypeDeclarationSQLSnippet ($length, $fixed) : string

method Doctrine\DBAL\Platforms\DrizzlePlatform::getBinaryTypeDeclarationSQLSnippet ($length, $fixed) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\DrizzlePlatform::initializeDoctrineTypeMappings () : void

Lazy load Doctrine Type Mappings.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getClobTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a CLOB column type.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getBlobTypeDeclarationSQL ($field) : string

Returns the SQL Snippet used to declare a BLOB column type.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getCreateDatabaseSQL ($name) : string

Returns the SQL to create a new database.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDropDatabaseSQL ($name) : string

Returns the SQL snippet to drop an existing database.

method Doctrine\DBAL\Platforms\DrizzlePlatform::_getCreateTableSQL ($tableName, $columns, $options = []) : string[]

Returns the SQL used to create a table.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getListDatabasesSQL () : string

method Doctrine\DBAL\Platforms\DrizzlePlatform::getReservedKeywordsClass () : string

Returns the class name of the reserved keywords list.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getListTablesSQL () : string

method Doctrine\DBAL\Platforms\DrizzlePlatform::getListTableColumnsSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\DrizzlePlatform::getListTableForeignKeysSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\DrizzlePlatform::getListTableIndexesSQL ($table, $database = null) : string

Returns the list of indexes for the current database.

The current database parameter is optional but will always be passed
when using the SchemaManager API and is the database the given table is in.

Attention: Some platforms only support currentDatabase when they
are connected with that database. Cross-database information schema
requests may be impossible.

method Doctrine\DBAL\Platforms\DrizzlePlatform::prefersIdentityColumns () : bool

Whether the platform prefers identity columns (eg. autoincrement) for ID generation.
Subclasses should override this method to return TRUE if they prefer identity columns.

method Doctrine\DBAL\Platforms\DrizzlePlatform::supportsIdentityColumns () : bool

Whether the platform supports identity columns.

Identity columns are columns that receive an auto-generated value from the
database on insert of a row.

method Doctrine\DBAL\Platforms\DrizzlePlatform::supportsInlineColumnComments () : bool

Whether this platform support to add inline column comments as postfix.

method Doctrine\DBAL\Platforms\DrizzlePlatform::supportsViews () : bool

Whether this platform supports views.

method Doctrine\DBAL\Platforms\DrizzlePlatform::supportsColumnCollation () : bool

Does this platform support column collation?

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDropIndexSQL ($index, $table = null) : string

Returns the SQL to drop an index from a table.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDropPrimaryKeySQL ($table) : void

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDateTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime fields in
statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create time fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDateTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create date fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getAlterTableSQL ($diff) : string[]

Gets the SQL statements for altering an existing table.

This method returns an array of SQL statements, since some platforms need several statements.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDropTemporaryTableSQL ($table) : string

Returns the SQL to safely drop a temporary table WITHOUT implicitly committing an open transaction.

method Doctrine\DBAL\Platforms\DrizzlePlatform::convertBooleans ($item) : mixed

Some platforms need the boolean values to be converted.

The default conversion in this implementation converts to integers (false => 0, true => 1).

Note: if the input is not a boolean the original input might be returned.

There are two contexts when converting booleans: Literals and Prepared Statements.
This method should handle the literal case

method Doctrine\DBAL\Platforms\DrizzlePlatform::getLocateExpression ($str, $substr, $startPos = false) : string

Returns the SQL snippet to get the position of the first occurrence of substring $substr in string $str.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getGuidExpression () : string

Returns the global unique identifier expression.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getRegexpExpression () : string

Returns the regular expression operator.

method Doctrine\DBAL\Platforms\DrizzlePlatform::__construct () : void

method Doctrine\DBAL\Platforms\DrizzlePlatform::setEventManager ($eventManager) : void

Sets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getEventManager () : Doctrine\Common\EventManager

Gets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getVarcharTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a VARCHAR column type.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getBinaryTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getGuidTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a GUID/UUID field.

By default this maps directly to a CHAR(36) and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getJsonTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a JSON field.

By default this maps directly to a CLOB and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\DrizzlePlatform::registerDoctrineTypeMapping ($dbType, $doctrineType) : void

Registers a doctrine type to be used in conjunction with a column type of this platform.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDoctrineTypeMapping ($dbType) : string

Gets the Doctrine type that is mapped for the given database column type.

method Doctrine\DBAL\Platforms\DrizzlePlatform::hasDoctrineTypeMappingFor ($dbType) : bool

Checks if a database type is currently supported by this platform.

method Doctrine\DBAL\Platforms\DrizzlePlatform::initializeCommentedDoctrineTypes () : void

Initializes the Doctrine Type comments instance variable for in_array() checks.

method Doctrine\DBAL\Platforms\DrizzlePlatform::isCommentedDoctrineType ($doctrineType) : bool

Is it necessary for the platform to add a parsable type comment to allow reverse engineering the given type?

method Doctrine\DBAL\Platforms\DrizzlePlatform::markDoctrineTypeCommented ($doctrineType) : void

Marks this type as to be commented in ALTER TABLE and CREATE TABLE statements.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDoctrineTypeComment ($doctrineType) : string

Gets the comment to append to a column comment that helps parsing this type in reverse engineering.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getColumnComment ($column) : stringnull

Gets the comment of a passed column modified by potential doctrine type comment hints.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getSqlCommentStartString () : string

Gets the string portion that starts an SQL comment.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getSqlCommentEndString () : string

Gets the string portion that ends an SQL comment.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getCharMaxLength () : int

Gets the maximum length of a char field.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getVarcharMaxLength () : int

Gets the maximum length of a varchar field.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getVarcharDefaultLength () : int

Gets the default length of a varchar field.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getBinaryMaxLength () : int

Gets the maximum length of a binary field.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getBinaryDefaultLength () : int

Gets the default length of a binary field.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getWildcards () : string[]

Gets all SQL wildcard characters of the platform.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getAvgExpression ($column) : string

Returns the SQL snippet to get the average value of a column.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getCountExpression ($column) : string

Returns the SQL snippet to get the number of rows (without a NULL value) of a column.

If a '*' is used instead of a column the number of selected rows is returned.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getMaxExpression ($column) : string

Returns the SQL snippet to get the highest value of a column.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getMinExpression ($column) : string

Returns the SQL snippet to get the lowest value of a column.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getSumExpression ($column) : string

Returns the SQL snippet to get the total sum of a column.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getMd5Expression ($column) : string

Returns the SQL snippet to get the md5 sum of a field.

Note: Not SQL92, but common functionality.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getLengthExpression ($column) : string

Returns the SQL snippet to get the length of a text field.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getSqrtExpression ($column) : string

Returns the SQL snippet to get the squared value of a column.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getRoundExpression ($column, $decimals = 0) : string

Returns the SQL snippet to round a numeric field to the number of decimals specified.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getModExpression ($expression1, $expression2) : string

Returns the SQL snippet to get the remainder of the division operation $expression1 / $expression2.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getTrimExpression ($str, $mode = Doctrine\DBAL\Platforms\TrimMode::UNSPECIFIED, $char = false) : string

Returns the SQL snippet to trim a string.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getRtrimExpression ($str) : string

Returns the SQL snippet to trim trailing space characters from the expression.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getLtrimExpression ($str) : string

Returns the SQL snippet to trim leading space characters from the expression.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getUpperExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to uppercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getLowerExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to lowercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getNowExpression () : string

Returns the SQL snippet to get the current system date.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getSubstringExpression ($value, $from, $length = null) : string

Returns a SQL snippet to get a substring inside an SQL statement.

Note: Not SQL92, but common functionality.

SQLite only supports the 2 parameter variant of this function.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getNotExpression ($expression) : string

Returns the SQL for a logical not.

Example:

$q = new Doctrine_Query();
$e = $q->expr;
$q->select('*')->from('table')
->where($e->eq('id', $e->not('null'));

method Doctrine\DBAL\Platforms\DrizzlePlatform::getIsNullExpression ($expression) : string

Returns the SQL that checks if an expression is null.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getIsNotNullExpression ($expression) : string

Returns the SQL that checks if an expression is not null.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getBetweenExpression ($expression, $value1, $value2) : string

Returns the SQL that checks if an expression evaluates to a value between two values.

The parameter $expression is checked if it is between $value1 and $value2.

Note: There is a slight difference in the way BETWEEN works on some databases.
http://www.w3schools.com/sql/sql_between.asp. If you want complete database
independence you should avoid using between().

method Doctrine\DBAL\Platforms\DrizzlePlatform::getAcosExpression ($value) : string

Returns the SQL to get the arccosine of a value.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getSinExpression ($value) : string

Returns the SQL to get the sine of a value.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getPiExpression () : string

Returns the SQL to get the PI value.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getCosExpression ($value) : string

Returns the SQL to get the cosine of a value.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDateAddSecondsExpression ($date, $seconds) : string

Returns the SQL to add the number of given seconds to a date.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDateSubSecondsExpression ($date, $seconds) : string

Returns the SQL to subtract the number of given seconds from a date.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDateAddMinutesExpression ($date, $minutes) : string

Returns the SQL to add the number of given minutes to a date.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDateSubMinutesExpression ($date, $minutes) : string

Returns the SQL to subtract the number of given minutes from a date.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDateAddHourExpression ($date, $hours) : string

Returns the SQL to add the number of given hours to a date.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDateSubHourExpression ($date, $hours) : string

Returns the SQL to subtract the number of given hours to a date.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDateAddDaysExpression ($date, $days) : string

Returns the SQL to add the number of given days to a date.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDateSubDaysExpression ($date, $days) : string

Returns the SQL to subtract the number of given days to a date.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDateAddWeeksExpression ($date, $weeks) : string

Returns the SQL to add the number of given weeks to a date.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDateSubWeeksExpression ($date, $weeks) : string

Returns the SQL to subtract the number of given weeks from a date.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDateAddMonthExpression ($date, $months) : string

Returns the SQL to add the number of given months to a date.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDateSubMonthExpression ($date, $months) : string

Returns the SQL to subtract the number of given months to a date.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDateAddQuartersExpression ($date, $quarters) : string

Returns the SQL to add the number of given quarters to a date.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDateSubQuartersExpression ($date, $quarters) : string

Returns the SQL to subtract the number of given quarters from a date.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDateAddYearsExpression ($date, $years) : string

Returns the SQL to add the number of given years to a date.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDateSubYearsExpression ($date, $years) : string

Returns the SQL to subtract the number of given years from a date.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getBitAndComparisonExpression ($value1, $value2) : string

Returns the SQL bit AND comparison expression.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getBitOrComparisonExpression ($value1, $value2) : string

Returns the SQL bit OR comparison expression.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getForUpdateSQL () : string

Returns the FOR UPDATE expression.

method Doctrine\DBAL\Platforms\DrizzlePlatform::appendLockHint ($fromClause, $lockMode) : string

Honors that some SQL vendors such as MsSql use table hints for locking instead of the ANSI SQL FOR UPDATE specification.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getReadLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which locks rows in shared read lock.

This defaults to the ANSI SQL "FOR UPDATE", which is an exclusive lock (Write). Some database
vendors allow to lighten this constraint up to be a real read lock.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getWriteLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which obtains an exclusive lock on the rows.

The semantics of this lock mode should equal the SELECT .. FOR UPDATE of the ANSI SQL standard.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDropTableSQL ($table) : string

Returns the SQL snippet to drop an existing table.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDropConstraintSQL ($constraint, $table) : string

Returns the SQL to drop a constraint.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDropForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to drop a foreign key.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getCreateTableSQL ($table, $createFlags = self::CREATE_INDEXES) : string[]

Returns the SQL statement(s) to create a table with the specified name, columns and constraints
on this platform.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getCommentOnTableSQL ($tableName, $comment) : string

method Doctrine\DBAL\Platforms\DrizzlePlatform::getCommentOnColumnSQL ($tableName, $columnName, $comment) : string

method Doctrine\DBAL\Platforms\DrizzlePlatform::getInlineColumnCommentSQL ($comment) : string

Returns the SQL to create inline comment on a column.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getCreateTemporaryTableSnippetSQL () : string

method Doctrine\DBAL\Platforms\DrizzlePlatform::getCreateSequenceSQL ($sequence) : string

Returns the SQL to create a sequence on this platform.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getAlterSequenceSQL ($sequence) : string

Returns the SQL to change a sequence on this platform.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getCreateConstraintSQL ($constraint, $table) : string

Returns the SQL to create a constraint on a table on this platform.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getCreateIndexSQL ($index, $table) : string

Returns the SQL to create an index on a table on this platform.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getPartialIndexSQL ($index) : string

Adds condition for partial index.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getCreateIndexSQLFlags ($index) : string

Adds additional flags for index generation.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getCreatePrimaryKeySQL ($index, $table) : string

Returns the SQL to create an unnamed primary key constraint.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getCreateSchemaSQL ($schemaName) : string

Returns the SQL to create a named schema.

method Doctrine\DBAL\Platforms\DrizzlePlatform::quoteIdentifier ($str) : string

Quotes a string so that it can be safely used as a table or column name,
even if it is a reserved word of the platform. This also detects identifier
chains separated by dot and quotes them independently.

NOTE: Just because you CAN use quoted identifiers doesn't mean
you SHOULD use them. In general, they end up causing way more
problems than they solve.

method Doctrine\DBAL\Platforms\DrizzlePlatform::quoteSingleIdentifier ($str) : string

Quotes a single identifier (no dot chain separation).

method Doctrine\DBAL\Platforms\DrizzlePlatform::getCreateForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to create a new foreign key.

method Doctrine\DBAL\Platforms\DrizzlePlatform::onSchemaAlterTableAddColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\DrizzlePlatform::onSchemaAlterTableRemoveColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\DrizzlePlatform::onSchemaAlterTableChangeColumn ($columnDiff, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\DrizzlePlatform::onSchemaAlterTableRenameColumn ($oldColumnName, $column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\DrizzlePlatform::onSchemaAlterTable ($diff, &$sql) : bool

method Doctrine\DBAL\Platforms\DrizzlePlatform::getPreAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\DrizzlePlatform::getPostAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\DrizzlePlatform::getRenameIndexSQL ($oldIndexName, $index, $tableName) : string[]

Returns the SQL for renaming an index on a table.

method Doctrine\DBAL\Platforms\DrizzlePlatform::_getAlterTableIndexForeignKeySQL ($diff) : string[]

Common code for alter table statement generation that updates the changed Index and Foreign Key definitions.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getColumnDeclarationListSQL ($fields) : string

Gets declaration of a number of fields in bulk.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getColumnDeclarationSQL ($name, $field) : string

Obtains DBMS specific SQL code portion needed to declare a generic type
field to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDecimalTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a floating point column of arbitrary precision.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDefaultValueDeclarationSQL ($field) : string

Obtains DBMS specific SQL code portion needed to set a default value
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getCheckDeclarationSQL ($definition) : string

Obtains DBMS specific SQL code portion needed to set a CHECK constraint
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getUniqueConstraintDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set a unique
constraint declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getIndexDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getCustomTypeDeclarationSQL ($columnDef) : string

Obtains SQL code portion needed to create a custom column,
e.g. when a field has the "columnDefinition" keyword.
Only "AUTOINCREMENT" and "PRIMARY KEY" are added if appropriate.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getIndexFieldDeclarationListSQL ($columnsOrIndex) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getTemporaryTableSQL () : string

Returns the required SQL string that fits between CREATE ... TABLE
to create the table as a temporary table.

Should be overridden in driver classes to return the correct string for the
specific database type.

The default is to return the string "TEMPORARY" - this will result in a
SQL error for any database that does not support temporary tables, or that
requires a different SQL command from "CREATE TEMPORARY TABLE".

method Doctrine\DBAL\Platforms\DrizzlePlatform::getTemporaryTableName ($tableName) : string

Some vendors require temporary table names to be qualified specially.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getForeignKeyDeclarationSQL ($foreignKey) : string

Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getAdvancedForeignKeyOptionsSQL ($foreignKey) : string

Returns the FOREIGN KEY query section dealing with non-standard options
as MATCH, INITIALLY DEFERRED, ON UPDATE, ...

method Doctrine\DBAL\Platforms\DrizzlePlatform::getForeignKeyReferentialActionSQL ($action) : string

Returns the given referential action in uppercase if valid, otherwise throws an exception.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getForeignKeyBaseDeclarationSQL ($foreignKey) : string

Obtains DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getUniqueFieldDeclarationSQL () : string

Obtains DBMS specific SQL code portion needed to set the UNIQUE constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getColumnCharsetDeclarationSQL ($charset) : string

Obtains DBMS specific SQL code portion needed to set the CHARACTER SET
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getColumnCollationDeclarationSQL ($collation) : string

Obtains DBMS specific SQL code portion needed to set the COLLATION
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\DrizzlePlatform::prefersSequences () : bool

Whether the platform prefers sequences for ID generation.
Subclasses should override this method to return TRUE if they prefer sequences.

method Doctrine\DBAL\Platforms\DrizzlePlatform::convertFromBoolean ($item) : boolnull

Some platforms have boolean literals that needs to be correctly converted

The default conversion tries to convert value into bool "(bool)$item"

method Doctrine\DBAL\Platforms\DrizzlePlatform::convertBooleansToDatabaseValue ($item) : mixed

This method should handle the prepared statements case. When there is no
distinction, it's OK to use the same method.

Note: if the input is not a boolean the original input might be returned.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getCurrentDateSQL () : string

Returns the SQL specific for the platform to get the current date.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getCurrentTimeSQL () : string

Returns the SQL specific for the platform to get the current time.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getCurrentTimestampSQL () : string

Returns the SQL specific for the platform to get the current timestamp

method Doctrine\DBAL\Platforms\DrizzlePlatform::_getTransactionIsolationLevelSQL ($level) : string

Returns the SQL for a given transaction isolation level Connection constant.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getListNamespacesSQL () : string

Returns the SQL statement for retrieving the namespaces defined in the database.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getListSequencesSQL ($database) : string

method Doctrine\DBAL\Platforms\DrizzlePlatform::getListTableConstraintsSQL ($table) : string

method Doctrine\DBAL\Platforms\DrizzlePlatform::getListUsersSQL () : string

method Doctrine\DBAL\Platforms\DrizzlePlatform::getListViewsSQL ($database) : string

Returns the SQL to list all views of a database or user.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getCreateViewSQL ($name, $sql) : string

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDropViewSQL ($name) : string

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDropSequenceSQL ($sequence) : string

Returns the SQL snippet to drop an existing sequence.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getSequenceNextValSQL ($sequenceName) : string

method Doctrine\DBAL\Platforms\DrizzlePlatform::getSetTransactionIsolationSQL ($level) : string

Returns the SQL to set the transaction isolation level.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDateTimeTzTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime with timezone offset fields.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getFloatDeclarationSQL ($fieldDeclaration) : string

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDefaultTransactionIsolationLevel () : int

Gets the default transaction isolation level of the platform.

method Doctrine\DBAL\Platforms\DrizzlePlatform::supportsSequences () : bool

Whether the platform supports sequences.

method Doctrine\DBAL\Platforms\DrizzlePlatform::usesSequenceEmulatedIdentityColumns () : bool

Whether the platform emulates identity columns through sequences.

Some platforms that do not support identity columns natively
but support sequences can emulate identity columns by using
sequences.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getIdentitySequenceName ($tableName, $columnName) : string

Returns the name of the sequence for a particular identity column in a particular table.

method Doctrine\DBAL\Platforms\DrizzlePlatform::supportsIndexes () : bool

Whether the platform supports indexes.

method Doctrine\DBAL\Platforms\DrizzlePlatform::supportsPartialIndexes () : bool

Whether the platform supports partial indexes.

method Doctrine\DBAL\Platforms\DrizzlePlatform::supportsColumnLengthIndexes () : bool

Whether the platform supports indexes with column length definitions.

method Doctrine\DBAL\Platforms\DrizzlePlatform::supportsAlterTable () : bool

Whether the platform supports altering tables.

method Doctrine\DBAL\Platforms\DrizzlePlatform::supportsTransactions () : bool

Whether the platform supports transactions.

method Doctrine\DBAL\Platforms\DrizzlePlatform::supportsSavepoints () : bool

Whether the platform supports savepoints.

method Doctrine\DBAL\Platforms\DrizzlePlatform::supportsReleaseSavepoints () : bool

Whether the platform supports releasing savepoints.

method Doctrine\DBAL\Platforms\DrizzlePlatform::supportsPrimaryConstraints () : bool

Whether the platform supports primary key constraints.

method Doctrine\DBAL\Platforms\DrizzlePlatform::supportsForeignKeyConstraints () : bool

Whether the platform supports foreign key constraints.

method Doctrine\DBAL\Platforms\DrizzlePlatform::supportsForeignKeyOnUpdate () : bool

Whether this platform supports onUpdate in foreign key constraints.

method Doctrine\DBAL\Platforms\DrizzlePlatform::supportsSchemas () : bool

Whether the platform supports database schemas.

method Doctrine\DBAL\Platforms\DrizzlePlatform::canEmulateSchemas () : bool

Whether this platform can emulate schemas.

Platforms that either support or emulate schemas don't automatically
filter a schema for the namespaced elements in {@link
AbstractManager#createSchema}.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDefaultSchemaName () : string

Returns the default schema name.

method Doctrine\DBAL\Platforms\DrizzlePlatform::supportsCreateDropDatabase () : bool

Whether this platform supports create database.

Some databases don't allow to create and drop databases at all or only with certain tools.

method Doctrine\DBAL\Platforms\DrizzlePlatform::supportsGettingAffectedRows () : bool

Whether the platform supports getting the affected rows of a recent update/delete type query.

method Doctrine\DBAL\Platforms\DrizzlePlatform::supportsCommentOnStatement () : bool

Whether this platform support the proprietary syntax "COMMENT ON asset".

method Doctrine\DBAL\Platforms\DrizzlePlatform::hasNativeGuidType () : bool

Does this platform have native guid type.

method Doctrine\DBAL\Platforms\DrizzlePlatform::hasNativeJsonType () : bool

Does this platform have native JSON type.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getIdentityColumnNullInsertSQL () : void

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDateTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime value of this platform.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDateTimeTzFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime with timezone value of this platform.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDateFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored date value of this platform.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored time value of this platform.

method Doctrine\DBAL\Platforms\DrizzlePlatform::modifyLimitQuery ($query, $limit, $offset = null) : string

Adds an driver-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\DrizzlePlatform::doModifyLimitQuery ($query, $limit, $offset) : string

Adds an platform-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\DrizzlePlatform::supportsLimitOffset () : bool

Whether the database platform support offsets in modify limit clauses.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getSQLResultCasing ($column) : string

Gets the character casing of a column in an SQL result set of this platform.

method Doctrine\DBAL\Platforms\DrizzlePlatform::fixSchemaElementName ($schemaElementName) : string

Makes any fixes to a name of a schema element (table, sequence, ...) that are required
by restrictions of the platform, like a maximum length.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getMaxIdentifierLength () : int

Maximum length of any given database identifier, like tables or column names.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getEmptyIdentityInsertSQL ($tableName, $identifierColumnName) : string

Returns the insert SQL for an empty insert statement.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getTruncateTableSQL ($tableName, $cascade = false) : string

Generates a Truncate Table SQL statement for a given table.

Cascade is not supported on many platforms but would optionally cascade the truncate by
following the foreign keys.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getDummySelectSQL () : string

This is for test reasons, many vendors have special requirements for dummy statements.

method Doctrine\DBAL\Platforms\DrizzlePlatform::createSavePoint ($savepoint) : string

Returns the SQL to create a new savepoint.

method Doctrine\DBAL\Platforms\DrizzlePlatform::releaseSavePoint ($savepoint) : string

Returns the SQL to release a savepoint.

method Doctrine\DBAL\Platforms\DrizzlePlatform::rollbackSavePoint ($savepoint) : string

Returns the SQL to rollback a savepoint.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getReservedKeywordsList () : Doctrine\DBAL\Platforms\Keywords\KeywordList

Returns the keyword list instance of this platform.

method Doctrine\DBAL\Platforms\DrizzlePlatform::quoteStringLiteral ($str) : string

Quotes a literal string.
This method is NOT meant to fix SQL injections!
It is only meant to escape this platform's string literal
quote character inside the given literal string.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getStringLiteralQuoteCharacter () : string

Gets the character used for string literal quoting.

method Doctrine\DBAL\Platforms\DrizzlePlatform::escapeStringForLike ($inputString, $escapeChar) : string

Escapes metacharacters in a string intended to be used with a LIKE
operator.

method Doctrine\DBAL\Platforms\DrizzlePlatform::getLikeWildcardCharacters () : string

class Doctrine\DBAL\Platforms::DB2Platform

classconstant integer Doctrine\DBAL\Platforms\DB2Platform::CREATE_INDEXES

classconstant integer Doctrine\DBAL\Platforms\DB2Platform::CREATE_FOREIGNKEYS

classconstant string Doctrine\DBAL\Platforms\DB2Platform::DATE_INTERVAL_UNIT_SECOND

classconstant string Doctrine\DBAL\Platforms\DB2Platform::DATE_INTERVAL_UNIT_MINUTE

classconstant string Doctrine\DBAL\Platforms\DB2Platform::DATE_INTERVAL_UNIT_HOUR

classconstant string Doctrine\DBAL\Platforms\DB2Platform::DATE_INTERVAL_UNIT_DAY

classconstant string Doctrine\DBAL\Platforms\DB2Platform::DATE_INTERVAL_UNIT_WEEK

classconstant string Doctrine\DBAL\Platforms\DB2Platform::DATE_INTERVAL_UNIT_MONTH

classconstant string Doctrine\DBAL\Platforms\DB2Platform::DATE_INTERVAL_UNIT_QUARTER

classconstant string Doctrine\DBAL\Platforms\DB2Platform::DATE_INTERVAL_UNIT_YEAR

classconstant integer Doctrine\DBAL\Platforms\DB2Platform::TRIM_UNSPECIFIED

classconstant integer Doctrine\DBAL\Platforms\DB2Platform::TRIM_LEADING

classconstant integer Doctrine\DBAL\Platforms\DB2Platform::TRIM_TRAILING

classconstant integer Doctrine\DBAL\Platforms\DB2Platform::TRIM_BOTH

property string[]null Doctrine\DBAL\Platforms\DB2Platform::doctrineTypeMapping

property string[]null Doctrine\DBAL\Platforms\DB2Platform::doctrineTypeComments

Contains a list of all columns that should generate parseable column comments for type-detection
in reverse engineering scenarios.

property Doctrine\Common\EventManager Doctrine\DBAL\Platforms\DB2Platform::_eventManager

property Doctrine\DBAL\Platforms\Keywords\KeywordListnull Doctrine\DBAL\Platforms\DB2Platform::_keywords

Holds the KeywordList instance for the current platform.

method Doctrine\DBAL\Platforms\DB2Platform::getCharMaxLength () : int

Gets the maximum length of a char field.

method Doctrine\DBAL\Platforms\DB2Platform::getBinaryMaxLength () : int

Gets the maximum length of a binary field.

method Doctrine\DBAL\Platforms\DB2Platform::getBinaryDefaultLength () : int

Gets the default length of a binary field.

method Doctrine\DBAL\Platforms\DB2Platform::getVarcharTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a VARCHAR column type.

method Doctrine\DBAL\Platforms\DB2Platform::getBlobTypeDeclarationSQL ($field) : string

Returns the SQL Snippet used to declare a BLOB column type.

method Doctrine\DBAL\Platforms\DB2Platform::initializeDoctrineTypeMappings () : void

Lazy load Doctrine Type Mappings.

method Doctrine\DBAL\Platforms\DB2Platform::isCommentedDoctrineType ($doctrineType) : bool

Is it necessary for the platform to add a parsable type comment to allow reverse engineering the given type?

method Doctrine\DBAL\Platforms\DB2Platform::getVarcharTypeDeclarationSQLSnippet ($length, $fixed) : string

method Doctrine\DBAL\Platforms\DB2Platform::getBinaryTypeDeclarationSQLSnippet ($length, $fixed) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\DB2Platform::getClobTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a CLOB column type.

method Doctrine\DBAL\Platforms\DB2Platform::getName () : string

Gets the name of the platform.

method Doctrine\DBAL\Platforms\DB2Platform::getBooleanTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a boolean column.

method Doctrine\DBAL\Platforms\DB2Platform::getIntegerTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a 4 byte integer column.

method Doctrine\DBAL\Platforms\DB2Platform::getBigIntTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares an 8 byte integer column.

method Doctrine\DBAL\Platforms\DB2Platform::getSmallIntTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a 2 byte integer column.

method Doctrine\DBAL\Platforms\DB2Platform::_getCommonIntegerTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares common properties of an integer column.

method Doctrine\DBAL\Platforms\DB2Platform::getBitAndComparisonExpression ($value1, $value2) : string

Returns the SQL bit AND comparison expression.

method Doctrine\DBAL\Platforms\DB2Platform::getBitOrComparisonExpression ($value1, $value2) : string

Returns the SQL bit OR comparison expression.

method Doctrine\DBAL\Platforms\DB2Platform::getDateArithmeticIntervalExpression ($date, $operator, $interval, $unit) : string

Returns the SQL for a date arithmetic expression.

method Doctrine\DBAL\Platforms\DB2Platform::getDateDiffExpression ($date1, $date2) : string

Returns the SQL to calculate the difference in days between the two passed dates.

Computes diff = date1 - date2.

method Doctrine\DBAL\Platforms\DB2Platform::getDateTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime fields in
statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\DB2Platform::getDateTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create date fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\DB2Platform::getTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create time fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\DB2Platform::getTruncateTableSQL ($tableName, $cascade = false) : string

Generates a Truncate Table SQL statement for a given table.

Cascade is not supported on many platforms but would optionally cascade the truncate by
following the foreign keys.

method Doctrine\DBAL\Platforms\DB2Platform::getListTableColumnsSQL ($table, $database = null) : string

This code fragment is originally from the Zend_Db_Adapter_Db2 class, but has been edited.

method Doctrine\DBAL\Platforms\DB2Platform::getListTablesSQL () : string

method Doctrine\DBAL\Platforms\DB2Platform::getListViewsSQL ($database) : string

Returns the SQL to list all views of a database or user.

method Doctrine\DBAL\Platforms\DB2Platform::getListTableIndexesSQL ($table, $currentDatabase = null) : string

Returns the list of indexes for the current database.

The current database parameter is optional but will always be passed
when using the SchemaManager API and is the database the given table is in.

Attention: Some platforms only support currentDatabase when they
are connected with that database. Cross-database information schema
requests may be impossible.

method Doctrine\DBAL\Platforms\DB2Platform::getListTableForeignKeysSQL ($table) : string

method Doctrine\DBAL\Platforms\DB2Platform::getCreateViewSQL ($name, $sql) : string

method Doctrine\DBAL\Platforms\DB2Platform::getDropViewSQL ($name) : string

method Doctrine\DBAL\Platforms\DB2Platform::getCreateDatabaseSQL ($database) : string

Returns the SQL to create a new database.

method Doctrine\DBAL\Platforms\DB2Platform::getDropDatabaseSQL ($database) : string

Returns the SQL snippet to drop an existing database.

method Doctrine\DBAL\Platforms\DB2Platform::supportsCreateDropDatabase () : bool

Whether this platform supports create database.

Some databases don't allow to create and drop databases at all or only with certain tools.

method Doctrine\DBAL\Platforms\DB2Platform::supportsReleaseSavepoints () : bool

Whether the platform supports releasing savepoints.

method Doctrine\DBAL\Platforms\DB2Platform::supportsCommentOnStatement () : bool

Whether this platform support the proprietary syntax "COMMENT ON asset".

method Doctrine\DBAL\Platforms\DB2Platform::getCurrentDateSQL () : string

Returns the SQL specific for the platform to get the current date.

method Doctrine\DBAL\Platforms\DB2Platform::getCurrentTimeSQL () : string

Returns the SQL specific for the platform to get the current time.

method Doctrine\DBAL\Platforms\DB2Platform::getCurrentTimestampSQL () : string

Returns the SQL specific for the platform to get the current timestamp

method Doctrine\DBAL\Platforms\DB2Platform::getIndexDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\DB2Platform::_getCreateTableSQL ($tableName, $columns, $options = []) : string[]

Returns the SQL used to create a table.

method Doctrine\DBAL\Platforms\DB2Platform::getAlterTableSQL ($diff) : string[]

Gets the SQL statements for altering an existing table.

This method returns an array of SQL statements, since some platforms need several statements.

method Doctrine\DBAL\Platforms\DB2Platform::getPreAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\DB2Platform::getRenameIndexSQL ($oldIndexName, $index, $tableName) : string[]

Returns the SQL for renaming an index on a table.

method Doctrine\DBAL\Platforms\DB2Platform::getDefaultValueDeclarationSQL ($field) : string

Obtains DBMS specific SQL code portion needed to set a default value
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\DB2Platform::getEmptyIdentityInsertSQL ($tableName, $identifierColumnName) : string

Returns the insert SQL for an empty insert statement.

method Doctrine\DBAL\Platforms\DB2Platform::getCreateTemporaryTableSnippetSQL () : string

method Doctrine\DBAL\Platforms\DB2Platform::getTemporaryTableName ($tableName) : string

Some vendors require temporary table names to be qualified specially.

method Doctrine\DBAL\Platforms\DB2Platform::doModifyLimitQuery ($query, $limit, $offset) : string

Adds an platform-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\DB2Platform::getLocateExpression ($str, $substr, $startPos = false) : string

Returns the SQL snippet to get the position of the first occurrence of substring $substr in string $str.

method Doctrine\DBAL\Platforms\DB2Platform::getSubstringExpression ($value, $from, $length = null) : string

Returns a SQL snippet to get a substring inside an SQL statement.

Note: Not SQL92, but common functionality.

SQLite only supports the 2 parameter variant of this function.

method Doctrine\DBAL\Platforms\DB2Platform::supportsIdentityColumns () : bool

Whether the platform supports identity columns.

Identity columns are columns that receive an auto-generated value from the
database on insert of a row.

method Doctrine\DBAL\Platforms\DB2Platform::prefersIdentityColumns () : bool

Whether the platform prefers identity columns (eg. autoincrement) for ID generation.
Subclasses should override this method to return TRUE if they prefer identity columns.

method Doctrine\DBAL\Platforms\DB2Platform::getSQLResultCasing ($column) : string

Gets the character casing of a column in an SQL result set of this platform.

DB2 returns all column names in SQL result sets in uppercase.

method Doctrine\DBAL\Platforms\DB2Platform::getForUpdateSQL () : string

Returns the FOR UPDATE expression.

method Doctrine\DBAL\Platforms\DB2Platform::getDummySelectSQL () : string

This is for test reasons, many vendors have special requirements for dummy statements.

method Doctrine\DBAL\Platforms\DB2Platform::supportsSavepoints () : bool

Whether the platform supports savepoints.

DB2 supports savepoints, but they work semantically different than on other vendor platforms.

TODO: We have to investigate how to get DB2 up and running with savepoints.

method Doctrine\DBAL\Platforms\DB2Platform::getReservedKeywordsClass () : string

Returns the class name of the reserved keywords list.

method Doctrine\DBAL\Platforms\DB2Platform::getListTableCommentsSQL ($table) : string

method Doctrine\DBAL\Platforms\DB2Platform::__construct () : void

method Doctrine\DBAL\Platforms\DB2Platform::setEventManager ($eventManager) : void

Sets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\DB2Platform::getEventManager () : Doctrine\Common\EventManager

Gets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\DB2Platform::getBinaryTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\DB2Platform::getGuidTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a GUID/UUID field.

By default this maps directly to a CHAR(36) and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\DB2Platform::getJsonTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a JSON field.

By default this maps directly to a CLOB and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\DB2Platform::registerDoctrineTypeMapping ($dbType, $doctrineType) : void

Registers a doctrine type to be used in conjunction with a column type of this platform.

method Doctrine\DBAL\Platforms\DB2Platform::getDoctrineTypeMapping ($dbType) : string

Gets the Doctrine type that is mapped for the given database column type.

method Doctrine\DBAL\Platforms\DB2Platform::hasDoctrineTypeMappingFor ($dbType) : bool

Checks if a database type is currently supported by this platform.

method Doctrine\DBAL\Platforms\DB2Platform::initializeCommentedDoctrineTypes () : void

Initializes the Doctrine Type comments instance variable for in_array() checks.

method Doctrine\DBAL\Platforms\DB2Platform::markDoctrineTypeCommented ($doctrineType) : void

Marks this type as to be commented in ALTER TABLE and CREATE TABLE statements.

method Doctrine\DBAL\Platforms\DB2Platform::getDoctrineTypeComment ($doctrineType) : string

Gets the comment to append to a column comment that helps parsing this type in reverse engineering.

method Doctrine\DBAL\Platforms\DB2Platform::getColumnComment ($column) : stringnull

Gets the comment of a passed column modified by potential doctrine type comment hints.

method Doctrine\DBAL\Platforms\DB2Platform::getIdentifierQuoteCharacter () : string

Gets the character used for identifier quoting.

method Doctrine\DBAL\Platforms\DB2Platform::getSqlCommentStartString () : string

Gets the string portion that starts an SQL comment.

method Doctrine\DBAL\Platforms\DB2Platform::getSqlCommentEndString () : string

Gets the string portion that ends an SQL comment.

method Doctrine\DBAL\Platforms\DB2Platform::getVarcharMaxLength () : int

Gets the maximum length of a varchar field.

method Doctrine\DBAL\Platforms\DB2Platform::getVarcharDefaultLength () : int

Gets the default length of a varchar field.

method Doctrine\DBAL\Platforms\DB2Platform::getWildcards () : string[]

Gets all SQL wildcard characters of the platform.

method Doctrine\DBAL\Platforms\DB2Platform::getRegexpExpression () : string

Returns the regular expression operator.

method Doctrine\DBAL\Platforms\DB2Platform::getGuidExpression () : string

Returns the global unique identifier expression.

method Doctrine\DBAL\Platforms\DB2Platform::getAvgExpression ($column) : string

Returns the SQL snippet to get the average value of a column.

method Doctrine\DBAL\Platforms\DB2Platform::getCountExpression ($column) : string

Returns the SQL snippet to get the number of rows (without a NULL value) of a column.

If a '*' is used instead of a column the number of selected rows is returned.

method Doctrine\DBAL\Platforms\DB2Platform::getMaxExpression ($column) : string

Returns the SQL snippet to get the highest value of a column.

method Doctrine\DBAL\Platforms\DB2Platform::getMinExpression ($column) : string

Returns the SQL snippet to get the lowest value of a column.

method Doctrine\DBAL\Platforms\DB2Platform::getSumExpression ($column) : string

Returns the SQL snippet to get the total sum of a column.

method Doctrine\DBAL\Platforms\DB2Platform::getMd5Expression ($column) : string

Returns the SQL snippet to get the md5 sum of a field.

Note: Not SQL92, but common functionality.

method Doctrine\DBAL\Platforms\DB2Platform::getLengthExpression ($column) : string

Returns the SQL snippet to get the length of a text field.

method Doctrine\DBAL\Platforms\DB2Platform::getSqrtExpression ($column) : string

Returns the SQL snippet to get the squared value of a column.

method Doctrine\DBAL\Platforms\DB2Platform::getRoundExpression ($column, $decimals = 0) : string

Returns the SQL snippet to round a numeric field to the number of decimals specified.

method Doctrine\DBAL\Platforms\DB2Platform::getModExpression ($expression1, $expression2) : string

Returns the SQL snippet to get the remainder of the division operation $expression1 / $expression2.

method Doctrine\DBAL\Platforms\DB2Platform::getTrimExpression ($str, $mode = Doctrine\DBAL\Platforms\TrimMode::UNSPECIFIED, $char = false) : string

Returns the SQL snippet to trim a string.

method Doctrine\DBAL\Platforms\DB2Platform::getRtrimExpression ($str) : string

Returns the SQL snippet to trim trailing space characters from the expression.

method Doctrine\DBAL\Platforms\DB2Platform::getLtrimExpression ($str) : string

Returns the SQL snippet to trim leading space characters from the expression.

method Doctrine\DBAL\Platforms\DB2Platform::getUpperExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to uppercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\DB2Platform::getLowerExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to lowercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\DB2Platform::getNowExpression () : string

Returns the SQL snippet to get the current system date.

method Doctrine\DBAL\Platforms\DB2Platform::getConcatExpression () : string

Returns a SQL snippet to concatenate the given expressions.

Accepts an arbitrary number of string parameters. Each parameter must contain an expression.

method Doctrine\DBAL\Platforms\DB2Platform::getNotExpression ($expression) : string

Returns the SQL for a logical not.

Example:

$q = new Doctrine_Query();
$e = $q->expr;
$q->select('*')->from('table')
->where($e->eq('id', $e->not('null'));

method Doctrine\DBAL\Platforms\DB2Platform::getIsNullExpression ($expression) : string

Returns the SQL that checks if an expression is null.

method Doctrine\DBAL\Platforms\DB2Platform::getIsNotNullExpression ($expression) : string

Returns the SQL that checks if an expression is not null.

method Doctrine\DBAL\Platforms\DB2Platform::getBetweenExpression ($expression, $value1, $value2) : string

Returns the SQL that checks if an expression evaluates to a value between two values.

The parameter $expression is checked if it is between $value1 and $value2.

Note: There is a slight difference in the way BETWEEN works on some databases.
http://www.w3schools.com/sql/sql_between.asp. If you want complete database
independence you should avoid using between().

method Doctrine\DBAL\Platforms\DB2Platform::getAcosExpression ($value) : string

Returns the SQL to get the arccosine of a value.

method Doctrine\DBAL\Platforms\DB2Platform::getSinExpression ($value) : string

Returns the SQL to get the sine of a value.

method Doctrine\DBAL\Platforms\DB2Platform::getPiExpression () : string

Returns the SQL to get the PI value.

method Doctrine\DBAL\Platforms\DB2Platform::getCosExpression ($value) : string

Returns the SQL to get the cosine of a value.

method Doctrine\DBAL\Platforms\DB2Platform::getDateAddSecondsExpression ($date, $seconds) : string

Returns the SQL to add the number of given seconds to a date.

method Doctrine\DBAL\Platforms\DB2Platform::getDateSubSecondsExpression ($date, $seconds) : string

Returns the SQL to subtract the number of given seconds from a date.

method Doctrine\DBAL\Platforms\DB2Platform::getDateAddMinutesExpression ($date, $minutes) : string

Returns the SQL to add the number of given minutes to a date.

method Doctrine\DBAL\Platforms\DB2Platform::getDateSubMinutesExpression ($date, $minutes) : string

Returns the SQL to subtract the number of given minutes from a date.

method Doctrine\DBAL\Platforms\DB2Platform::getDateAddHourExpression ($date, $hours) : string

Returns the SQL to add the number of given hours to a date.

method Doctrine\DBAL\Platforms\DB2Platform::getDateSubHourExpression ($date, $hours) : string

Returns the SQL to subtract the number of given hours to a date.

method Doctrine\DBAL\Platforms\DB2Platform::getDateAddDaysExpression ($date, $days) : string

Returns the SQL to add the number of given days to a date.

method Doctrine\DBAL\Platforms\DB2Platform::getDateSubDaysExpression ($date, $days) : string

Returns the SQL to subtract the number of given days to a date.

method Doctrine\DBAL\Platforms\DB2Platform::getDateAddWeeksExpression ($date, $weeks) : string

Returns the SQL to add the number of given weeks to a date.

method Doctrine\DBAL\Platforms\DB2Platform::getDateSubWeeksExpression ($date, $weeks) : string

Returns the SQL to subtract the number of given weeks from a date.

method Doctrine\DBAL\Platforms\DB2Platform::getDateAddMonthExpression ($date, $months) : string

Returns the SQL to add the number of given months to a date.

method Doctrine\DBAL\Platforms\DB2Platform::getDateSubMonthExpression ($date, $months) : string

Returns the SQL to subtract the number of given months to a date.

method Doctrine\DBAL\Platforms\DB2Platform::getDateAddQuartersExpression ($date, $quarters) : string

Returns the SQL to add the number of given quarters to a date.

method Doctrine\DBAL\Platforms\DB2Platform::getDateSubQuartersExpression ($date, $quarters) : string

Returns the SQL to subtract the number of given quarters from a date.

method Doctrine\DBAL\Platforms\DB2Platform::getDateAddYearsExpression ($date, $years) : string

Returns the SQL to add the number of given years to a date.

method Doctrine\DBAL\Platforms\DB2Platform::getDateSubYearsExpression ($date, $years) : string

Returns the SQL to subtract the number of given years from a date.

method Doctrine\DBAL\Platforms\DB2Platform::appendLockHint ($fromClause, $lockMode) : string

Honors that some SQL vendors such as MsSql use table hints for locking instead of the ANSI SQL FOR UPDATE specification.

method Doctrine\DBAL\Platforms\DB2Platform::getReadLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which locks rows in shared read lock.

This defaults to the ANSI SQL "FOR UPDATE", which is an exclusive lock (Write). Some database
vendors allow to lighten this constraint up to be a real read lock.

method Doctrine\DBAL\Platforms\DB2Platform::getWriteLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which obtains an exclusive lock on the rows.

The semantics of this lock mode should equal the SELECT .. FOR UPDATE of the ANSI SQL standard.

method Doctrine\DBAL\Platforms\DB2Platform::getDropTableSQL ($table) : string

Returns the SQL snippet to drop an existing table.

method Doctrine\DBAL\Platforms\DB2Platform::getDropTemporaryTableSQL ($table) : string

Returns the SQL to safely drop a temporary table WITHOUT implicitly committing an open transaction.

method Doctrine\DBAL\Platforms\DB2Platform::getDropIndexSQL ($index, $table = null) : string

Returns the SQL to drop an index from a table.

method Doctrine\DBAL\Platforms\DB2Platform::getDropConstraintSQL ($constraint, $table) : string

Returns the SQL to drop a constraint.

method Doctrine\DBAL\Platforms\DB2Platform::getDropForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to drop a foreign key.

method Doctrine\DBAL\Platforms\DB2Platform::getCreateTableSQL ($table, $createFlags = self::CREATE_INDEXES) : string[]

Returns the SQL statement(s) to create a table with the specified name, columns and constraints
on this platform.

method Doctrine\DBAL\Platforms\DB2Platform::getCommentOnTableSQL ($tableName, $comment) : string

method Doctrine\DBAL\Platforms\DB2Platform::getCommentOnColumnSQL ($tableName, $columnName, $comment) : string

method Doctrine\DBAL\Platforms\DB2Platform::getInlineColumnCommentSQL ($comment) : string

Returns the SQL to create inline comment on a column.

method Doctrine\DBAL\Platforms\DB2Platform::getCreateSequenceSQL ($sequence) : string

Returns the SQL to create a sequence on this platform.

method Doctrine\DBAL\Platforms\DB2Platform::getAlterSequenceSQL ($sequence) : string

Returns the SQL to change a sequence on this platform.

method Doctrine\DBAL\Platforms\DB2Platform::getCreateConstraintSQL ($constraint, $table) : string

Returns the SQL to create a constraint on a table on this platform.

method Doctrine\DBAL\Platforms\DB2Platform::getCreateIndexSQL ($index, $table) : string

Returns the SQL to create an index on a table on this platform.

method Doctrine\DBAL\Platforms\DB2Platform::getPartialIndexSQL ($index) : string

Adds condition for partial index.

method Doctrine\DBAL\Platforms\DB2Platform::getCreateIndexSQLFlags ($index) : string

Adds additional flags for index generation.

method Doctrine\DBAL\Platforms\DB2Platform::getCreatePrimaryKeySQL ($index, $table) : string

Returns the SQL to create an unnamed primary key constraint.

method Doctrine\DBAL\Platforms\DB2Platform::getCreateSchemaSQL ($schemaName) : string

Returns the SQL to create a named schema.

method Doctrine\DBAL\Platforms\DB2Platform::quoteIdentifier ($str) : string

Quotes a string so that it can be safely used as a table or column name,
even if it is a reserved word of the platform. This also detects identifier
chains separated by dot and quotes them independently.

NOTE: Just because you CAN use quoted identifiers doesn't mean
you SHOULD use them. In general, they end up causing way more
problems than they solve.

method Doctrine\DBAL\Platforms\DB2Platform::quoteSingleIdentifier ($str) : string

Quotes a single identifier (no dot chain separation).

method Doctrine\DBAL\Platforms\DB2Platform::getCreateForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to create a new foreign key.

method Doctrine\DBAL\Platforms\DB2Platform::onSchemaAlterTableAddColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\DB2Platform::onSchemaAlterTableRemoveColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\DB2Platform::onSchemaAlterTableChangeColumn ($columnDiff, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\DB2Platform::onSchemaAlterTableRenameColumn ($oldColumnName, $column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\DB2Platform::onSchemaAlterTable ($diff, &$sql) : bool

method Doctrine\DBAL\Platforms\DB2Platform::getPostAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\DB2Platform::_getAlterTableIndexForeignKeySQL ($diff) : string[]

Common code for alter table statement generation that updates the changed Index and Foreign Key definitions.

method Doctrine\DBAL\Platforms\DB2Platform::getColumnDeclarationListSQL ($fields) : string

Gets declaration of a number of fields in bulk.

method Doctrine\DBAL\Platforms\DB2Platform::getColumnDeclarationSQL ($name, $field) : string

Obtains DBMS specific SQL code portion needed to declare a generic type
field to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\DB2Platform::getDecimalTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a floating point column of arbitrary precision.

method Doctrine\DBAL\Platforms\DB2Platform::getCheckDeclarationSQL ($definition) : string

Obtains DBMS specific SQL code portion needed to set a CHECK constraint
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\DB2Platform::getUniqueConstraintDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set a unique
constraint declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\DB2Platform::getCustomTypeDeclarationSQL ($columnDef) : string

Obtains SQL code portion needed to create a custom column,
e.g. when a field has the "columnDefinition" keyword.
Only "AUTOINCREMENT" and "PRIMARY KEY" are added if appropriate.

method Doctrine\DBAL\Platforms\DB2Platform::getIndexFieldDeclarationListSQL ($columnsOrIndex) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\DB2Platform::getTemporaryTableSQL () : string

Returns the required SQL string that fits between CREATE ... TABLE
to create the table as a temporary table.

Should be overridden in driver classes to return the correct string for the
specific database type.

The default is to return the string "TEMPORARY" - this will result in a
SQL error for any database that does not support temporary tables, or that
requires a different SQL command from "CREATE TEMPORARY TABLE".

method Doctrine\DBAL\Platforms\DB2Platform::getForeignKeyDeclarationSQL ($foreignKey) : string

Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\DB2Platform::getAdvancedForeignKeyOptionsSQL ($foreignKey) : string

Returns the FOREIGN KEY query section dealing with non-standard options
as MATCH, INITIALLY DEFERRED, ON UPDATE, ...

method Doctrine\DBAL\Platforms\DB2Platform::getForeignKeyReferentialActionSQL ($action) : string

Returns the given referential action in uppercase if valid, otherwise throws an exception.

method Doctrine\DBAL\Platforms\DB2Platform::getForeignKeyBaseDeclarationSQL ($foreignKey) : string

Obtains DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\DB2Platform::getUniqueFieldDeclarationSQL () : string

Obtains DBMS specific SQL code portion needed to set the UNIQUE constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\DB2Platform::getColumnCharsetDeclarationSQL ($charset) : string

Obtains DBMS specific SQL code portion needed to set the CHARACTER SET
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\DB2Platform::getColumnCollationDeclarationSQL ($collation) : string

Obtains DBMS specific SQL code portion needed to set the COLLATION
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\DB2Platform::prefersSequences () : bool

Whether the platform prefers sequences for ID generation.
Subclasses should override this method to return TRUE if they prefer sequences.

method Doctrine\DBAL\Platforms\DB2Platform::convertBooleans ($item) : mixed

Some platforms need the boolean values to be converted.

The default conversion in this implementation converts to integers (false => 0, true => 1).

Note: if the input is not a boolean the original input might be returned.

There are two contexts when converting booleans: Literals and Prepared Statements.
This method should handle the literal case

method Doctrine\DBAL\Platforms\DB2Platform::convertFromBoolean ($item) : boolnull

Some platforms have boolean literals that needs to be correctly converted

The default conversion tries to convert value into bool "(bool)$item"

method Doctrine\DBAL\Platforms\DB2Platform::convertBooleansToDatabaseValue ($item) : mixed

This method should handle the prepared statements case. When there is no
distinction, it's OK to use the same method.

Note: if the input is not a boolean the original input might be returned.

method Doctrine\DBAL\Platforms\DB2Platform::_getTransactionIsolationLevelSQL ($level) : string

Returns the SQL for a given transaction isolation level Connection constant.

method Doctrine\DBAL\Platforms\DB2Platform::getListDatabasesSQL () : string

method Doctrine\DBAL\Platforms\DB2Platform::getListNamespacesSQL () : string

Returns the SQL statement for retrieving the namespaces defined in the database.

method Doctrine\DBAL\Platforms\DB2Platform::getListSequencesSQL ($database) : string

method Doctrine\DBAL\Platforms\DB2Platform::getListTableConstraintsSQL ($table) : string

method Doctrine\DBAL\Platforms\DB2Platform::getListUsersSQL () : string

method Doctrine\DBAL\Platforms\DB2Platform::getDropSequenceSQL ($sequence) : string

Returns the SQL snippet to drop an existing sequence.

method Doctrine\DBAL\Platforms\DB2Platform::getSequenceNextValSQL ($sequenceName) : string

method Doctrine\DBAL\Platforms\DB2Platform::getSetTransactionIsolationSQL ($level) : string

Returns the SQL to set the transaction isolation level.

method Doctrine\DBAL\Platforms\DB2Platform::getDateTimeTzTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime with timezone offset fields.

method Doctrine\DBAL\Platforms\DB2Platform::getFloatDeclarationSQL ($fieldDeclaration) : string

method Doctrine\DBAL\Platforms\DB2Platform::getDefaultTransactionIsolationLevel () : int

Gets the default transaction isolation level of the platform.

method Doctrine\DBAL\Platforms\DB2Platform::supportsSequences () : bool

Whether the platform supports sequences.

method Doctrine\DBAL\Platforms\DB2Platform::usesSequenceEmulatedIdentityColumns () : bool

Whether the platform emulates identity columns through sequences.

Some platforms that do not support identity columns natively
but support sequences can emulate identity columns by using
sequences.

method Doctrine\DBAL\Platforms\DB2Platform::getIdentitySequenceName ($tableName, $columnName) : string

Returns the name of the sequence for a particular identity column in a particular table.

method Doctrine\DBAL\Platforms\DB2Platform::supportsIndexes () : bool

Whether the platform supports indexes.

method Doctrine\DBAL\Platforms\DB2Platform::supportsPartialIndexes () : bool

Whether the platform supports partial indexes.

method Doctrine\DBAL\Platforms\DB2Platform::supportsColumnLengthIndexes () : bool

Whether the platform supports indexes with column length definitions.

method Doctrine\DBAL\Platforms\DB2Platform::supportsAlterTable () : bool

Whether the platform supports altering tables.

method Doctrine\DBAL\Platforms\DB2Platform::supportsTransactions () : bool

Whether the platform supports transactions.

method Doctrine\DBAL\Platforms\DB2Platform::supportsPrimaryConstraints () : bool

Whether the platform supports primary key constraints.

method Doctrine\DBAL\Platforms\DB2Platform::supportsForeignKeyConstraints () : bool

Whether the platform supports foreign key constraints.

method Doctrine\DBAL\Platforms\DB2Platform::supportsForeignKeyOnUpdate () : bool

Whether this platform supports onUpdate in foreign key constraints.

method Doctrine\DBAL\Platforms\DB2Platform::supportsSchemas () : bool

Whether the platform supports database schemas.

method Doctrine\DBAL\Platforms\DB2Platform::canEmulateSchemas () : bool

Whether this platform can emulate schemas.

Platforms that either support or emulate schemas don't automatically
filter a schema for the namespaced elements in {@link
AbstractManager#createSchema}.

method Doctrine\DBAL\Platforms\DB2Platform::getDefaultSchemaName () : string

Returns the default schema name.

method Doctrine\DBAL\Platforms\DB2Platform::supportsGettingAffectedRows () : bool

Whether the platform supports getting the affected rows of a recent update/delete type query.

method Doctrine\DBAL\Platforms\DB2Platform::supportsInlineColumnComments () : bool

Whether this platform support to add inline column comments as postfix.

method Doctrine\DBAL\Platforms\DB2Platform::hasNativeGuidType () : bool

Does this platform have native guid type.

method Doctrine\DBAL\Platforms\DB2Platform::hasNativeJsonType () : bool

Does this platform have native JSON type.

method Doctrine\DBAL\Platforms\DB2Platform::getIdentityColumnNullInsertSQL () : void

method Doctrine\DBAL\Platforms\DB2Platform::supportsViews () : bool

Whether this platform supports views.

method Doctrine\DBAL\Platforms\DB2Platform::supportsColumnCollation () : bool

Does this platform support column collation?

method Doctrine\DBAL\Platforms\DB2Platform::getDateTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime value of this platform.

method Doctrine\DBAL\Platforms\DB2Platform::getDateTimeTzFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime with timezone value of this platform.

method Doctrine\DBAL\Platforms\DB2Platform::getDateFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored date value of this platform.

method Doctrine\DBAL\Platforms\DB2Platform::getTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored time value of this platform.

method Doctrine\DBAL\Platforms\DB2Platform::modifyLimitQuery ($query, $limit, $offset = null) : string

Adds an driver-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\DB2Platform::supportsLimitOffset () : bool

Whether the database platform support offsets in modify limit clauses.

method Doctrine\DBAL\Platforms\DB2Platform::fixSchemaElementName ($schemaElementName) : string

Makes any fixes to a name of a schema element (table, sequence, ...) that are required
by restrictions of the platform, like a maximum length.

method Doctrine\DBAL\Platforms\DB2Platform::getMaxIdentifierLength () : int

Maximum length of any given database identifier, like tables or column names.

method Doctrine\DBAL\Platforms\DB2Platform::createSavePoint ($savepoint) : string

Returns the SQL to create a new savepoint.

method Doctrine\DBAL\Platforms\DB2Platform::releaseSavePoint ($savepoint) : string

Returns the SQL to release a savepoint.

method Doctrine\DBAL\Platforms\DB2Platform::rollbackSavePoint ($savepoint) : string

Returns the SQL to rollback a savepoint.

method Doctrine\DBAL\Platforms\DB2Platform::getReservedKeywordsList () : Doctrine\DBAL\Platforms\Keywords\KeywordList

Returns the keyword list instance of this platform.

method Doctrine\DBAL\Platforms\DB2Platform::quoteStringLiteral ($str) : string

Quotes a literal string.
This method is NOT meant to fix SQL injections!
It is only meant to escape this platform's string literal
quote character inside the given literal string.

method Doctrine\DBAL\Platforms\DB2Platform::getStringLiteralQuoteCharacter () : string

Gets the character used for string literal quoting.

method Doctrine\DBAL\Platforms\DB2Platform::escapeStringForLike ($inputString, $escapeChar) : string

Escapes metacharacters in a string intended to be used with a LIKE
operator.

method Doctrine\DBAL\Platforms\DB2Platform::getLikeWildcardCharacters () : string

class Doctrine\DBAL\Platforms::MySqlPlatform

The MySqlPlatform provides the behavior, features and SQL dialect of the
MySQL database platform. This platform represents a MySQL 5.0 or greater platform that
uses the InnoDB storage engine.

classconstant integer Doctrine\DBAL\Platforms\MySqlPlatform::LENGTH_LIMIT_TINYTEXT

classconstant integer Doctrine\DBAL\Platforms\MySqlPlatform::LENGTH_LIMIT_TEXT

classconstant integer Doctrine\DBAL\Platforms\MySqlPlatform::LENGTH_LIMIT_MEDIUMTEXT

classconstant integer Doctrine\DBAL\Platforms\MySqlPlatform::LENGTH_LIMIT_TINYBLOB

classconstant integer Doctrine\DBAL\Platforms\MySqlPlatform::LENGTH_LIMIT_BLOB

classconstant integer Doctrine\DBAL\Platforms\MySqlPlatform::LENGTH_LIMIT_MEDIUMBLOB

classconstant integer Doctrine\DBAL\Platforms\MySqlPlatform::CREATE_INDEXES

classconstant integer Doctrine\DBAL\Platforms\MySqlPlatform::CREATE_FOREIGNKEYS

classconstant string Doctrine\DBAL\Platforms\MySqlPlatform::DATE_INTERVAL_UNIT_SECOND

classconstant string Doctrine\DBAL\Platforms\MySqlPlatform::DATE_INTERVAL_UNIT_MINUTE

classconstant string Doctrine\DBAL\Platforms\MySqlPlatform::DATE_INTERVAL_UNIT_HOUR

classconstant string Doctrine\DBAL\Platforms\MySqlPlatform::DATE_INTERVAL_UNIT_DAY

classconstant string Doctrine\DBAL\Platforms\MySqlPlatform::DATE_INTERVAL_UNIT_WEEK

classconstant string Doctrine\DBAL\Platforms\MySqlPlatform::DATE_INTERVAL_UNIT_MONTH

classconstant string Doctrine\DBAL\Platforms\MySqlPlatform::DATE_INTERVAL_UNIT_QUARTER

classconstant string Doctrine\DBAL\Platforms\MySqlPlatform::DATE_INTERVAL_UNIT_YEAR

classconstant integer Doctrine\DBAL\Platforms\MySqlPlatform::TRIM_UNSPECIFIED

classconstant integer Doctrine\DBAL\Platforms\MySqlPlatform::TRIM_LEADING

classconstant integer Doctrine\DBAL\Platforms\MySqlPlatform::TRIM_TRAILING

classconstant integer Doctrine\DBAL\Platforms\MySqlPlatform::TRIM_BOTH

property string[]null Doctrine\DBAL\Platforms\MySqlPlatform::doctrineTypeMapping

property string[]null Doctrine\DBAL\Platforms\MySqlPlatform::doctrineTypeComments

Contains a list of all columns that should generate parseable column comments for type-detection
in reverse engineering scenarios.

property Doctrine\Common\EventManager Doctrine\DBAL\Platforms\MySqlPlatform::_eventManager

property Doctrine\DBAL\Platforms\Keywords\KeywordListnull Doctrine\DBAL\Platforms\MySqlPlatform::_keywords

Holds the KeywordList instance for the current platform.

method Doctrine\DBAL\Platforms\MySqlPlatform::doModifyLimitQuery ($query, $limit, $offset) : string

Adds an platform-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\MySqlPlatform::getIdentifierQuoteCharacter () : string

Gets the character used for identifier quoting.

method Doctrine\DBAL\Platforms\MySqlPlatform::getRegexpExpression () : string

Returns the regular expression operator.

method Doctrine\DBAL\Platforms\MySqlPlatform::getGuidExpression () : string

Returns the global unique identifier expression.

method Doctrine\DBAL\Platforms\MySqlPlatform::getLocateExpression ($str, $substr, $startPos = false) : string

Returns the SQL snippet to get the position of the first occurrence of substring $substr in string $str.

method Doctrine\DBAL\Platforms\MySqlPlatform::getConcatExpression () : string

Returns a SQL snippet to concatenate the given expressions.

Accepts an arbitrary number of string parameters. Each parameter must contain an expression.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDateArithmeticIntervalExpression ($date, $operator, $interval, $unit) : string

Returns the SQL for a date arithmetic expression.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDateDiffExpression ($date1, $date2) : string

Returns the SQL to calculate the difference in days between the two passed dates.

Computes diff = date1 - date2.

method Doctrine\DBAL\Platforms\MySqlPlatform::getListDatabasesSQL () : string

method Doctrine\DBAL\Platforms\MySqlPlatform::getListTableConstraintsSQL ($table) : string

method Doctrine\DBAL\Platforms\MySqlPlatform::getListTableIndexesSQL ($table, $currentDatabase = null) : string

Returns the list of indexes for the current database.

The current database parameter is optional but will always be passed
when using the SchemaManager API and is the database the given table is in.

Attention: Some platforms only support currentDatabase when they
are connected with that database. Cross-database information schema
requests may be impossible.

Two approaches to listing the table indexes. The information_schema is
preferred, because it doesn't cause problems with SQL keywords such as "order" or "table".

method Doctrine\DBAL\Platforms\MySqlPlatform::getListViewsSQL ($database) : string

Returns the SQL to list all views of a database or user.

method Doctrine\DBAL\Platforms\MySqlPlatform::getListTableForeignKeysSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\MySqlPlatform::getCreateViewSQL ($name, $sql) : string

method Doctrine\DBAL\Platforms\MySqlPlatform::getDropViewSQL ($name) : string

method Doctrine\DBAL\Platforms\MySqlPlatform::getVarcharTypeDeclarationSQLSnippet ($length, $fixed) : string

method Doctrine\DBAL\Platforms\MySqlPlatform::getBinaryTypeDeclarationSQLSnippet ($length, $fixed) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\MySqlPlatform::getClobTypeDeclarationSQL ($field) : string

Gets the SQL snippet used to declare a CLOB column type.

TINYTEXT   : 2 ^  8 - 1 = 255
TEXT       : 2 ^ 16 - 1 = 65535
MEDIUMTEXT : 2 ^ 24 - 1 = 16777215
LONGTEXT   : 2 ^ 32 - 1 = 4294967295

Returns the SQL snippet used to declare a CLOB column type.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDateTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime fields in
statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDateTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create date fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySqlPlatform::getTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create time fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySqlPlatform::getBooleanTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a boolean column.

method Doctrine\DBAL\Platforms\MySqlPlatform::getCollationFieldDeclaration ($collation) : string

Obtain DBMS specific SQL code portion needed to set the COLLATION
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySqlPlatform::prefersIdentityColumns () : bool

Whether the platform prefers identity columns (eg. autoincrement) for ID generation.
Subclasses should override this method to return TRUE if they prefer identity columns.

MySql prefers "autoincrement" identity columns since sequences can only
be emulated with a table.

method Doctrine\DBAL\Platforms\MySqlPlatform::supportsIdentityColumns () : bool

Whether the platform supports identity columns.

Identity columns are columns that receive an auto-generated value from the
database on insert of a row.

MySql supports this through AUTO_INCREMENT columns.

method Doctrine\DBAL\Platforms\MySqlPlatform::supportsInlineColumnComments () : bool

Whether this platform support to add inline column comments as postfix.

method Doctrine\DBAL\Platforms\MySqlPlatform::supportsColumnCollation () : bool

Does this platform support column collation?

method Doctrine\DBAL\Platforms\MySqlPlatform::getListTablesSQL () : string

method Doctrine\DBAL\Platforms\MySqlPlatform::getListTableColumnsSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\MySqlPlatform::getListTableMetadataSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\MySqlPlatform::getCreateDatabaseSQL ($name) : string

Returns the SQL to create a new database.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDropDatabaseSQL ($name) : string

Returns the SQL snippet to drop an existing database.

method Doctrine\DBAL\Platforms\MySqlPlatform::_getCreateTableSQL ($tableName, $columns, $options = []) : string[]

Returns the SQL used to create a table.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDefaultValueDeclarationSQL ($field) : string

Obtains DBMS specific SQL code portion needed to set a default value
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySqlPlatform::getAlterTableSQL ($diff) : string[]

Gets the SQL statements for altering an existing table.

This method returns an array of SQL statements, since some platforms need several statements.

method Doctrine\DBAL\Platforms\MySqlPlatform::getPreAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\MySqlPlatform::getPreAlterTableRenameIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\MySqlPlatform::getPostAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\MySqlPlatform::getPostAlterTableRenameIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\MySqlPlatform::getCreateIndexSQLFlags ($index) : string

Adds additional flags for index generation.

method Doctrine\DBAL\Platforms\MySqlPlatform::getIntegerTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a 4 byte integer column.

method Doctrine\DBAL\Platforms\MySqlPlatform::getBigIntTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares an 8 byte integer column.

method Doctrine\DBAL\Platforms\MySqlPlatform::getSmallIntTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a 2 byte integer column.

method Doctrine\DBAL\Platforms\MySqlPlatform::getFloatDeclarationSQL ($field) : string

method Doctrine\DBAL\Platforms\MySqlPlatform::getDecimalTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a floating point column of arbitrary precision.

method Doctrine\DBAL\Platforms\MySqlPlatform::_getCommonIntegerTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares common properties of an integer column.

method Doctrine\DBAL\Platforms\MySqlPlatform::getColumnCharsetDeclarationSQL ($charset) : string

Obtains DBMS specific SQL code portion needed to set the CHARACTER SET
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySqlPlatform::getColumnCollationDeclarationSQL ($collation) : string

Obtains DBMS specific SQL code portion needed to set the COLLATION
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySqlPlatform::getAdvancedForeignKeyOptionsSQL ($foreignKey) : string

Returns the FOREIGN KEY query section dealing with non-standard options
as MATCH, INITIALLY DEFERRED, ON UPDATE, ...

method Doctrine\DBAL\Platforms\MySqlPlatform::getDropIndexSQL ($index, $table = null) : string

Returns the SQL to drop an index from a table.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDropPrimaryKeySQL ($table) : string

method Doctrine\DBAL\Platforms\MySqlPlatform::getSetTransactionIsolationSQL ($level) : string

Returns the SQL to set the transaction isolation level.

method Doctrine\DBAL\Platforms\MySqlPlatform::getName () : string

Gets the name of the platform.

method Doctrine\DBAL\Platforms\MySqlPlatform::getReadLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which locks rows in shared read lock.

This defaults to the ANSI SQL "FOR UPDATE", which is an exclusive lock (Write). Some database
vendors allow to lighten this constraint up to be a real read lock.

method Doctrine\DBAL\Platforms\MySqlPlatform::initializeDoctrineTypeMappings () : void

Lazy load Doctrine Type Mappings.

method Doctrine\DBAL\Platforms\MySqlPlatform::getVarcharMaxLength () : int

Gets the maximum length of a varchar field.

method Doctrine\DBAL\Platforms\MySqlPlatform::getBinaryMaxLength () : int

Gets the maximum length of a binary field.

method Doctrine\DBAL\Platforms\MySqlPlatform::getReservedKeywordsClass () : string

Returns the class name of the reserved keywords list.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDropTemporaryTableSQL ($table) : string

Returns the SQL to safely drop a temporary table WITHOUT implicitly committing an open transaction.

MySQL commits a transaction implicitly when DROP TABLE is executed, however not
if DROP TEMPORARY TABLE is executed.

method Doctrine\DBAL\Platforms\MySqlPlatform::getBlobTypeDeclarationSQL ($field) : string

Gets the SQL Snippet used to declare a BLOB column type.

TINYBLOB   : 2 ^  8 - 1 = 255
BLOB       : 2 ^ 16 - 1 = 65535
MEDIUMBLOB : 2 ^ 24 - 1 = 16777215
LONGBLOB   : 2 ^ 32 - 1 = 4294967295

Returns the SQL Snippet used to declare a BLOB column type.

method Doctrine\DBAL\Platforms\MySqlPlatform::quoteStringLiteral ($str) : string

Quotes a literal string.
This method is NOT meant to fix SQL injections!
It is only meant to escape this platform's string literal
quote character inside the given literal string.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDefaultTransactionIsolationLevel () : int

Gets the default transaction isolation level of the platform.

method Doctrine\DBAL\Platforms\MySqlPlatform::supportsColumnLengthIndexes () : bool

Whether the platform supports indexes with column length definitions.

method Doctrine\DBAL\Platforms\MySqlPlatform::__construct () : void

method Doctrine\DBAL\Platforms\MySqlPlatform::setEventManager ($eventManager) : void

Sets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\MySqlPlatform::getEventManager () : Doctrine\Common\EventManager

Gets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\MySqlPlatform::getVarcharTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a VARCHAR column type.

method Doctrine\DBAL\Platforms\MySqlPlatform::getBinaryTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\MySqlPlatform::getGuidTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a GUID/UUID field.

By default this maps directly to a CHAR(36) and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\MySqlPlatform::getJsonTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a JSON field.

By default this maps directly to a CLOB and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\MySqlPlatform::registerDoctrineTypeMapping ($dbType, $doctrineType) : void

Registers a doctrine type to be used in conjunction with a column type of this platform.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDoctrineTypeMapping ($dbType) : string

Gets the Doctrine type that is mapped for the given database column type.

method Doctrine\DBAL\Platforms\MySqlPlatform::hasDoctrineTypeMappingFor ($dbType) : bool

Checks if a database type is currently supported by this platform.

method Doctrine\DBAL\Platforms\MySqlPlatform::initializeCommentedDoctrineTypes () : void

Initializes the Doctrine Type comments instance variable for in_array() checks.

method Doctrine\DBAL\Platforms\MySqlPlatform::isCommentedDoctrineType ($doctrineType) : bool

Is it necessary for the platform to add a parsable type comment to allow reverse engineering the given type?

method Doctrine\DBAL\Platforms\MySqlPlatform::markDoctrineTypeCommented ($doctrineType) : void

Marks this type as to be commented in ALTER TABLE and CREATE TABLE statements.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDoctrineTypeComment ($doctrineType) : string

Gets the comment to append to a column comment that helps parsing this type in reverse engineering.

method Doctrine\DBAL\Platforms\MySqlPlatform::getColumnComment ($column) : stringnull

Gets the comment of a passed column modified by potential doctrine type comment hints.

method Doctrine\DBAL\Platforms\MySqlPlatform::getSqlCommentStartString () : string

Gets the string portion that starts an SQL comment.

method Doctrine\DBAL\Platforms\MySqlPlatform::getSqlCommentEndString () : string

Gets the string portion that ends an SQL comment.

method Doctrine\DBAL\Platforms\MySqlPlatform::getCharMaxLength () : int

Gets the maximum length of a char field.

method Doctrine\DBAL\Platforms\MySqlPlatform::getVarcharDefaultLength () : int

Gets the default length of a varchar field.

method Doctrine\DBAL\Platforms\MySqlPlatform::getBinaryDefaultLength () : int

Gets the default length of a binary field.

method Doctrine\DBAL\Platforms\MySqlPlatform::getWildcards () : string[]

Gets all SQL wildcard characters of the platform.

method Doctrine\DBAL\Platforms\MySqlPlatform::getAvgExpression ($column) : string

Returns the SQL snippet to get the average value of a column.

method Doctrine\DBAL\Platforms\MySqlPlatform::getCountExpression ($column) : string

Returns the SQL snippet to get the number of rows (without a NULL value) of a column.

If a '*' is used instead of a column the number of selected rows is returned.

method Doctrine\DBAL\Platforms\MySqlPlatform::getMaxExpression ($column) : string

Returns the SQL snippet to get the highest value of a column.

method Doctrine\DBAL\Platforms\MySqlPlatform::getMinExpression ($column) : string

Returns the SQL snippet to get the lowest value of a column.

method Doctrine\DBAL\Platforms\MySqlPlatform::getSumExpression ($column) : string

Returns the SQL snippet to get the total sum of a column.

method Doctrine\DBAL\Platforms\MySqlPlatform::getMd5Expression ($column) : string

Returns the SQL snippet to get the md5 sum of a field.

Note: Not SQL92, but common functionality.

method Doctrine\DBAL\Platforms\MySqlPlatform::getLengthExpression ($column) : string

Returns the SQL snippet to get the length of a text field.

method Doctrine\DBAL\Platforms\MySqlPlatform::getSqrtExpression ($column) : string

Returns the SQL snippet to get the squared value of a column.

method Doctrine\DBAL\Platforms\MySqlPlatform::getRoundExpression ($column, $decimals = 0) : string

Returns the SQL snippet to round a numeric field to the number of decimals specified.

method Doctrine\DBAL\Platforms\MySqlPlatform::getModExpression ($expression1, $expression2) : string

Returns the SQL snippet to get the remainder of the division operation $expression1 / $expression2.

method Doctrine\DBAL\Platforms\MySqlPlatform::getTrimExpression ($str, $mode = Doctrine\DBAL\Platforms\TrimMode::UNSPECIFIED, $char = false) : string

Returns the SQL snippet to trim a string.

method Doctrine\DBAL\Platforms\MySqlPlatform::getRtrimExpression ($str) : string

Returns the SQL snippet to trim trailing space characters from the expression.

method Doctrine\DBAL\Platforms\MySqlPlatform::getLtrimExpression ($str) : string

Returns the SQL snippet to trim leading space characters from the expression.

method Doctrine\DBAL\Platforms\MySqlPlatform::getUpperExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to uppercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\MySqlPlatform::getLowerExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to lowercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\MySqlPlatform::getNowExpression () : string

Returns the SQL snippet to get the current system date.

method Doctrine\DBAL\Platforms\MySqlPlatform::getSubstringExpression ($value, $from, $length = null) : string

Returns a SQL snippet to get a substring inside an SQL statement.

Note: Not SQL92, but common functionality.

SQLite only supports the 2 parameter variant of this function.

method Doctrine\DBAL\Platforms\MySqlPlatform::getNotExpression ($expression) : string

Returns the SQL for a logical not.

Example:

$q = new Doctrine_Query();
$e = $q->expr;
$q->select('*')->from('table')
->where($e->eq('id', $e->not('null'));

method Doctrine\DBAL\Platforms\MySqlPlatform::getIsNullExpression ($expression) : string

Returns the SQL that checks if an expression is null.

method Doctrine\DBAL\Platforms\MySqlPlatform::getIsNotNullExpression ($expression) : string

Returns the SQL that checks if an expression is not null.

method Doctrine\DBAL\Platforms\MySqlPlatform::getBetweenExpression ($expression, $value1, $value2) : string

Returns the SQL that checks if an expression evaluates to a value between two values.

The parameter $expression is checked if it is between $value1 and $value2.

Note: There is a slight difference in the way BETWEEN works on some databases.
http://www.w3schools.com/sql/sql_between.asp. If you want complete database
independence you should avoid using between().

method Doctrine\DBAL\Platforms\MySqlPlatform::getAcosExpression ($value) : string

Returns the SQL to get the arccosine of a value.

method Doctrine\DBAL\Platforms\MySqlPlatform::getSinExpression ($value) : string

Returns the SQL to get the sine of a value.

method Doctrine\DBAL\Platforms\MySqlPlatform::getPiExpression () : string

Returns the SQL to get the PI value.

method Doctrine\DBAL\Platforms\MySqlPlatform::getCosExpression ($value) : string

Returns the SQL to get the cosine of a value.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDateAddSecondsExpression ($date, $seconds) : string

Returns the SQL to add the number of given seconds to a date.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDateSubSecondsExpression ($date, $seconds) : string

Returns the SQL to subtract the number of given seconds from a date.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDateAddMinutesExpression ($date, $minutes) : string

Returns the SQL to add the number of given minutes to a date.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDateSubMinutesExpression ($date, $minutes) : string

Returns the SQL to subtract the number of given minutes from a date.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDateAddHourExpression ($date, $hours) : string

Returns the SQL to add the number of given hours to a date.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDateSubHourExpression ($date, $hours) : string

Returns the SQL to subtract the number of given hours to a date.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDateAddDaysExpression ($date, $days) : string

Returns the SQL to add the number of given days to a date.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDateSubDaysExpression ($date, $days) : string

Returns the SQL to subtract the number of given days to a date.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDateAddWeeksExpression ($date, $weeks) : string

Returns the SQL to add the number of given weeks to a date.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDateSubWeeksExpression ($date, $weeks) : string

Returns the SQL to subtract the number of given weeks from a date.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDateAddMonthExpression ($date, $months) : string

Returns the SQL to add the number of given months to a date.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDateSubMonthExpression ($date, $months) : string

Returns the SQL to subtract the number of given months to a date.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDateAddQuartersExpression ($date, $quarters) : string

Returns the SQL to add the number of given quarters to a date.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDateSubQuartersExpression ($date, $quarters) : string

Returns the SQL to subtract the number of given quarters from a date.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDateAddYearsExpression ($date, $years) : string

Returns the SQL to add the number of given years to a date.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDateSubYearsExpression ($date, $years) : string

Returns the SQL to subtract the number of given years from a date.

method Doctrine\DBAL\Platforms\MySqlPlatform::getBitAndComparisonExpression ($value1, $value2) : string

Returns the SQL bit AND comparison expression.

method Doctrine\DBAL\Platforms\MySqlPlatform::getBitOrComparisonExpression ($value1, $value2) : string

Returns the SQL bit OR comparison expression.

method Doctrine\DBAL\Platforms\MySqlPlatform::getForUpdateSQL () : string

Returns the FOR UPDATE expression.

method Doctrine\DBAL\Platforms\MySqlPlatform::appendLockHint ($fromClause, $lockMode) : string

Honors that some SQL vendors such as MsSql use table hints for locking instead of the ANSI SQL FOR UPDATE specification.

method Doctrine\DBAL\Platforms\MySqlPlatform::getWriteLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which obtains an exclusive lock on the rows.

The semantics of this lock mode should equal the SELECT .. FOR UPDATE of the ANSI SQL standard.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDropTableSQL ($table) : string

Returns the SQL snippet to drop an existing table.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDropConstraintSQL ($constraint, $table) : string

Returns the SQL to drop a constraint.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDropForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to drop a foreign key.

method Doctrine\DBAL\Platforms\MySqlPlatform::getCreateTableSQL ($table, $createFlags = self::CREATE_INDEXES) : string[]

Returns the SQL statement(s) to create a table with the specified name, columns and constraints
on this platform.

method Doctrine\DBAL\Platforms\MySqlPlatform::getCommentOnTableSQL ($tableName, $comment) : string

method Doctrine\DBAL\Platforms\MySqlPlatform::getCommentOnColumnSQL ($tableName, $columnName, $comment) : string

method Doctrine\DBAL\Platforms\MySqlPlatform::getInlineColumnCommentSQL ($comment) : string

Returns the SQL to create inline comment on a column.

method Doctrine\DBAL\Platforms\MySqlPlatform::getCreateTemporaryTableSnippetSQL () : string

method Doctrine\DBAL\Platforms\MySqlPlatform::getCreateSequenceSQL ($sequence) : string

Returns the SQL to create a sequence on this platform.

method Doctrine\DBAL\Platforms\MySqlPlatform::getAlterSequenceSQL ($sequence) : string

Returns the SQL to change a sequence on this platform.

method Doctrine\DBAL\Platforms\MySqlPlatform::getCreateConstraintSQL ($constraint, $table) : string

Returns the SQL to create a constraint on a table on this platform.

method Doctrine\DBAL\Platforms\MySqlPlatform::getCreateIndexSQL ($index, $table) : string

Returns the SQL to create an index on a table on this platform.

method Doctrine\DBAL\Platforms\MySqlPlatform::getPartialIndexSQL ($index) : string

Adds condition for partial index.

method Doctrine\DBAL\Platforms\MySqlPlatform::getCreatePrimaryKeySQL ($index, $table) : string

Returns the SQL to create an unnamed primary key constraint.

method Doctrine\DBAL\Platforms\MySqlPlatform::getCreateSchemaSQL ($schemaName) : string

Returns the SQL to create a named schema.

method Doctrine\DBAL\Platforms\MySqlPlatform::quoteIdentifier ($str) : string

Quotes a string so that it can be safely used as a table or column name,
even if it is a reserved word of the platform. This also detects identifier
chains separated by dot and quotes them independently.

NOTE: Just because you CAN use quoted identifiers doesn't mean
you SHOULD use them. In general, they end up causing way more
problems than they solve.

method Doctrine\DBAL\Platforms\MySqlPlatform::quoteSingleIdentifier ($str) : string

Quotes a single identifier (no dot chain separation).

method Doctrine\DBAL\Platforms\MySqlPlatform::getCreateForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to create a new foreign key.

method Doctrine\DBAL\Platforms\MySqlPlatform::onSchemaAlterTableAddColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\MySqlPlatform::onSchemaAlterTableRemoveColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\MySqlPlatform::onSchemaAlterTableChangeColumn ($columnDiff, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\MySqlPlatform::onSchemaAlterTableRenameColumn ($oldColumnName, $column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\MySqlPlatform::onSchemaAlterTable ($diff, &$sql) : bool

method Doctrine\DBAL\Platforms\MySqlPlatform::getRenameIndexSQL ($oldIndexName, $index, $tableName) : string[]

Returns the SQL for renaming an index on a table.

method Doctrine\DBAL\Platforms\MySqlPlatform::_getAlterTableIndexForeignKeySQL ($diff) : string[]

Common code for alter table statement generation that updates the changed Index and Foreign Key definitions.

method Doctrine\DBAL\Platforms\MySqlPlatform::getColumnDeclarationListSQL ($fields) : string

Gets declaration of a number of fields in bulk.

method Doctrine\DBAL\Platforms\MySqlPlatform::getColumnDeclarationSQL ($name, $field) : string

Obtains DBMS specific SQL code portion needed to declare a generic type
field to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySqlPlatform::getCheckDeclarationSQL ($definition) : string

Obtains DBMS specific SQL code portion needed to set a CHECK constraint
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySqlPlatform::getUniqueConstraintDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set a unique
constraint declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySqlPlatform::getIndexDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySqlPlatform::getCustomTypeDeclarationSQL ($columnDef) : string

Obtains SQL code portion needed to create a custom column,
e.g. when a field has the "columnDefinition" keyword.
Only "AUTOINCREMENT" and "PRIMARY KEY" are added if appropriate.

method Doctrine\DBAL\Platforms\MySqlPlatform::getIndexFieldDeclarationListSQL ($columnsOrIndex) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySqlPlatform::getTemporaryTableSQL () : string

Returns the required SQL string that fits between CREATE ... TABLE
to create the table as a temporary table.

Should be overridden in driver classes to return the correct string for the
specific database type.

The default is to return the string "TEMPORARY" - this will result in a
SQL error for any database that does not support temporary tables, or that
requires a different SQL command from "CREATE TEMPORARY TABLE".

method Doctrine\DBAL\Platforms\MySqlPlatform::getTemporaryTableName ($tableName) : string

Some vendors require temporary table names to be qualified specially.

method Doctrine\DBAL\Platforms\MySqlPlatform::getForeignKeyDeclarationSQL ($foreignKey) : string

Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySqlPlatform::getForeignKeyReferentialActionSQL ($action) : string

Returns the given referential action in uppercase if valid, otherwise throws an exception.

method Doctrine\DBAL\Platforms\MySqlPlatform::getForeignKeyBaseDeclarationSQL ($foreignKey) : string

Obtains DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySqlPlatform::getUniqueFieldDeclarationSQL () : string

Obtains DBMS specific SQL code portion needed to set the UNIQUE constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySqlPlatform::prefersSequences () : bool

Whether the platform prefers sequences for ID generation.
Subclasses should override this method to return TRUE if they prefer sequences.

method Doctrine\DBAL\Platforms\MySqlPlatform::convertBooleans ($item) : mixed

Some platforms need the boolean values to be converted.

The default conversion in this implementation converts to integers (false => 0, true => 1).

Note: if the input is not a boolean the original input might be returned.

There are two contexts when converting booleans: Literals and Prepared Statements.
This method should handle the literal case

method Doctrine\DBAL\Platforms\MySqlPlatform::convertFromBoolean ($item) : boolnull

Some platforms have boolean literals that needs to be correctly converted

The default conversion tries to convert value into bool "(bool)$item"

method Doctrine\DBAL\Platforms\MySqlPlatform::convertBooleansToDatabaseValue ($item) : mixed

This method should handle the prepared statements case. When there is no
distinction, it's OK to use the same method.

Note: if the input is not a boolean the original input might be returned.

method Doctrine\DBAL\Platforms\MySqlPlatform::getCurrentDateSQL () : string

Returns the SQL specific for the platform to get the current date.

method Doctrine\DBAL\Platforms\MySqlPlatform::getCurrentTimeSQL () : string

Returns the SQL specific for the platform to get the current time.

method Doctrine\DBAL\Platforms\MySqlPlatform::getCurrentTimestampSQL () : string

Returns the SQL specific for the platform to get the current timestamp

method Doctrine\DBAL\Platforms\MySqlPlatform::_getTransactionIsolationLevelSQL ($level) : string

Returns the SQL for a given transaction isolation level Connection constant.

method Doctrine\DBAL\Platforms\MySqlPlatform::getListNamespacesSQL () : string

Returns the SQL statement for retrieving the namespaces defined in the database.

method Doctrine\DBAL\Platforms\MySqlPlatform::getListSequencesSQL ($database) : string

method Doctrine\DBAL\Platforms\MySqlPlatform::getListUsersSQL () : string

method Doctrine\DBAL\Platforms\MySqlPlatform::getDropSequenceSQL ($sequence) : string

Returns the SQL snippet to drop an existing sequence.

method Doctrine\DBAL\Platforms\MySqlPlatform::getSequenceNextValSQL ($sequenceName) : string

method Doctrine\DBAL\Platforms\MySqlPlatform::getDateTimeTzTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime with timezone offset fields.

method Doctrine\DBAL\Platforms\MySqlPlatform::supportsSequences () : bool

Whether the platform supports sequences.

method Doctrine\DBAL\Platforms\MySqlPlatform::usesSequenceEmulatedIdentityColumns () : bool

Whether the platform emulates identity columns through sequences.

Some platforms that do not support identity columns natively
but support sequences can emulate identity columns by using
sequences.

method Doctrine\DBAL\Platforms\MySqlPlatform::getIdentitySequenceName ($tableName, $columnName) : string

Returns the name of the sequence for a particular identity column in a particular table.

method Doctrine\DBAL\Platforms\MySqlPlatform::supportsIndexes () : bool

Whether the platform supports indexes.

method Doctrine\DBAL\Platforms\MySqlPlatform::supportsPartialIndexes () : bool

Whether the platform supports partial indexes.

method Doctrine\DBAL\Platforms\MySqlPlatform::supportsAlterTable () : bool

Whether the platform supports altering tables.

method Doctrine\DBAL\Platforms\MySqlPlatform::supportsTransactions () : bool

Whether the platform supports transactions.

method Doctrine\DBAL\Platforms\MySqlPlatform::supportsSavepoints () : bool

Whether the platform supports savepoints.

method Doctrine\DBAL\Platforms\MySqlPlatform::supportsReleaseSavepoints () : bool

Whether the platform supports releasing savepoints.

method Doctrine\DBAL\Platforms\MySqlPlatform::supportsPrimaryConstraints () : bool

Whether the platform supports primary key constraints.

method Doctrine\DBAL\Platforms\MySqlPlatform::supportsForeignKeyConstraints () : bool

Whether the platform supports foreign key constraints.

method Doctrine\DBAL\Platforms\MySqlPlatform::supportsForeignKeyOnUpdate () : bool

Whether this platform supports onUpdate in foreign key constraints.

method Doctrine\DBAL\Platforms\MySqlPlatform::supportsSchemas () : bool

Whether the platform supports database schemas.

method Doctrine\DBAL\Platforms\MySqlPlatform::canEmulateSchemas () : bool

Whether this platform can emulate schemas.

Platforms that either support or emulate schemas don't automatically
filter a schema for the namespaced elements in {@link
AbstractManager#createSchema}.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDefaultSchemaName () : string

Returns the default schema name.

method Doctrine\DBAL\Platforms\MySqlPlatform::supportsCreateDropDatabase () : bool

Whether this platform supports create database.

Some databases don't allow to create and drop databases at all or only with certain tools.

method Doctrine\DBAL\Platforms\MySqlPlatform::supportsGettingAffectedRows () : bool

Whether the platform supports getting the affected rows of a recent update/delete type query.

method Doctrine\DBAL\Platforms\MySqlPlatform::supportsCommentOnStatement () : bool

Whether this platform support the proprietary syntax "COMMENT ON asset".

method Doctrine\DBAL\Platforms\MySqlPlatform::hasNativeGuidType () : bool

Does this platform have native guid type.

method Doctrine\DBAL\Platforms\MySqlPlatform::hasNativeJsonType () : bool

Does this platform have native JSON type.

method Doctrine\DBAL\Platforms\MySqlPlatform::getIdentityColumnNullInsertSQL () : void

method Doctrine\DBAL\Platforms\MySqlPlatform::supportsViews () : bool

Whether this platform supports views.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDateTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime value of this platform.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDateTimeTzFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime with timezone value of this platform.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDateFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored date value of this platform.

method Doctrine\DBAL\Platforms\MySqlPlatform::getTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored time value of this platform.

method Doctrine\DBAL\Platforms\MySqlPlatform::modifyLimitQuery ($query, $limit, $offset = null) : string

Adds an driver-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\MySqlPlatform::supportsLimitOffset () : bool

Whether the database platform support offsets in modify limit clauses.

method Doctrine\DBAL\Platforms\MySqlPlatform::getSQLResultCasing ($column) : string

Gets the character casing of a column in an SQL result set of this platform.

method Doctrine\DBAL\Platforms\MySqlPlatform::fixSchemaElementName ($schemaElementName) : string

Makes any fixes to a name of a schema element (table, sequence, ...) that are required
by restrictions of the platform, like a maximum length.

method Doctrine\DBAL\Platforms\MySqlPlatform::getMaxIdentifierLength () : int

Maximum length of any given database identifier, like tables or column names.

method Doctrine\DBAL\Platforms\MySqlPlatform::getEmptyIdentityInsertSQL ($tableName, $identifierColumnName) : string

Returns the insert SQL for an empty insert statement.

method Doctrine\DBAL\Platforms\MySqlPlatform::getTruncateTableSQL ($tableName, $cascade = false) : string

Generates a Truncate Table SQL statement for a given table.

Cascade is not supported on many platforms but would optionally cascade the truncate by
following the foreign keys.

method Doctrine\DBAL\Platforms\MySqlPlatform::getDummySelectSQL () : string

This is for test reasons, many vendors have special requirements for dummy statements.

method Doctrine\DBAL\Platforms\MySqlPlatform::createSavePoint ($savepoint) : string

Returns the SQL to create a new savepoint.

method Doctrine\DBAL\Platforms\MySqlPlatform::releaseSavePoint ($savepoint) : string

Returns the SQL to release a savepoint.

method Doctrine\DBAL\Platforms\MySqlPlatform::rollbackSavePoint ($savepoint) : string

Returns the SQL to rollback a savepoint.

method Doctrine\DBAL\Platforms\MySqlPlatform::getReservedKeywordsList () : Doctrine\DBAL\Platforms\Keywords\KeywordList

Returns the keyword list instance of this platform.

method Doctrine\DBAL\Platforms\MySqlPlatform::getStringLiteralQuoteCharacter () : string

Gets the character used for string literal quoting.

method Doctrine\DBAL\Platforms\MySqlPlatform::escapeStringForLike ($inputString, $escapeChar) : string

Escapes metacharacters in a string intended to be used with a LIKE
operator.

method Doctrine\DBAL\Platforms\MySqlPlatform::getLikeWildcardCharacters () : string

class Doctrine\DBAL\Platforms::MariaDb1027Platform

Provides the behavior, features and SQL dialect of the MariaDB 10.2 (10.2.7 GA) database platform.

Note: Should not be used with versions prior to 10.2.7.

classconstant integer Doctrine\DBAL\Platforms\MariaDb1027Platform::LENGTH_LIMIT_TINYTEXT

classconstant integer Doctrine\DBAL\Platforms\MariaDb1027Platform::LENGTH_LIMIT_TEXT

classconstant integer Doctrine\DBAL\Platforms\MariaDb1027Platform::LENGTH_LIMIT_MEDIUMTEXT

classconstant integer Doctrine\DBAL\Platforms\MariaDb1027Platform::LENGTH_LIMIT_TINYBLOB

classconstant integer Doctrine\DBAL\Platforms\MariaDb1027Platform::LENGTH_LIMIT_BLOB

classconstant integer Doctrine\DBAL\Platforms\MariaDb1027Platform::LENGTH_LIMIT_MEDIUMBLOB

classconstant integer Doctrine\DBAL\Platforms\MariaDb1027Platform::CREATE_INDEXES

classconstant integer Doctrine\DBAL\Platforms\MariaDb1027Platform::CREATE_FOREIGNKEYS

classconstant string Doctrine\DBAL\Platforms\MariaDb1027Platform::DATE_INTERVAL_UNIT_SECOND

classconstant string Doctrine\DBAL\Platforms\MariaDb1027Platform::DATE_INTERVAL_UNIT_MINUTE

classconstant string Doctrine\DBAL\Platforms\MariaDb1027Platform::DATE_INTERVAL_UNIT_HOUR

classconstant string Doctrine\DBAL\Platforms\MariaDb1027Platform::DATE_INTERVAL_UNIT_DAY

classconstant string Doctrine\DBAL\Platforms\MariaDb1027Platform::DATE_INTERVAL_UNIT_WEEK

classconstant string Doctrine\DBAL\Platforms\MariaDb1027Platform::DATE_INTERVAL_UNIT_MONTH

classconstant string Doctrine\DBAL\Platforms\MariaDb1027Platform::DATE_INTERVAL_UNIT_QUARTER

classconstant string Doctrine\DBAL\Platforms\MariaDb1027Platform::DATE_INTERVAL_UNIT_YEAR

classconstant integer Doctrine\DBAL\Platforms\MariaDb1027Platform::TRIM_UNSPECIFIED

classconstant integer Doctrine\DBAL\Platforms\MariaDb1027Platform::TRIM_LEADING

classconstant integer Doctrine\DBAL\Platforms\MariaDb1027Platform::TRIM_TRAILING

classconstant integer Doctrine\DBAL\Platforms\MariaDb1027Platform::TRIM_BOTH

property string[]null Doctrine\DBAL\Platforms\MariaDb1027Platform::doctrineTypeMapping

property string[]null Doctrine\DBAL\Platforms\MariaDb1027Platform::doctrineTypeComments

Contains a list of all columns that should generate parseable column comments for type-detection
in reverse engineering scenarios.

property Doctrine\Common\EventManager Doctrine\DBAL\Platforms\MariaDb1027Platform::_eventManager

property Doctrine\DBAL\Platforms\Keywords\KeywordListnull Doctrine\DBAL\Platforms\MariaDb1027Platform::_keywords

Holds the KeywordList instance for the current platform.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getJsonTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a JSON field.

By default this maps directly to a CLOB and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getReservedKeywordsClass () : string

Returns the class name of the reserved keywords list.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::initializeDoctrineTypeMappings () : void

Lazy load Doctrine Type Mappings.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::doModifyLimitQuery ($query, $limit, $offset) : string

Adds an platform-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getIdentifierQuoteCharacter () : string

Gets the character used for identifier quoting.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getRegexpExpression () : string

Returns the regular expression operator.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getGuidExpression () : string

Returns the global unique identifier expression.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getLocateExpression ($str, $substr, $startPos = false) : string

Returns the SQL snippet to get the position of the first occurrence of substring $substr in string $str.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getConcatExpression () : string

Returns a SQL snippet to concatenate the given expressions.

Accepts an arbitrary number of string parameters. Each parameter must contain an expression.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDateArithmeticIntervalExpression ($date, $operator, $interval, $unit) : string

Returns the SQL for a date arithmetic expression.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDateDiffExpression ($date1, $date2) : string

Returns the SQL to calculate the difference in days between the two passed dates.

Computes diff = date1 - date2.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getListDatabasesSQL () : string

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getListTableConstraintsSQL ($table) : string

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getListTableIndexesSQL ($table, $currentDatabase = null) : string

Returns the list of indexes for the current database.

The current database parameter is optional but will always be passed
when using the SchemaManager API and is the database the given table is in.

Attention: Some platforms only support currentDatabase when they
are connected with that database. Cross-database information schema
requests may be impossible.

Two approaches to listing the table indexes. The information_schema is
preferred, because it doesn't cause problems with SQL keywords such as "order" or "table".

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getListViewsSQL ($database) : string

Returns the SQL to list all views of a database or user.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getListTableForeignKeysSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getCreateViewSQL ($name, $sql) : string

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDropViewSQL ($name) : string

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getVarcharTypeDeclarationSQLSnippet ($length, $fixed) : string

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getBinaryTypeDeclarationSQLSnippet ($length, $fixed) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getClobTypeDeclarationSQL ($field) : string

Gets the SQL snippet used to declare a CLOB column type.

TINYTEXT   : 2 ^  8 - 1 = 255
TEXT       : 2 ^ 16 - 1 = 65535
MEDIUMTEXT : 2 ^ 24 - 1 = 16777215
LONGTEXT   : 2 ^ 32 - 1 = 4294967295

Returns the SQL snippet used to declare a CLOB column type.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDateTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime fields in
statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDateTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create date fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create time fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getBooleanTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a boolean column.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getCollationFieldDeclaration ($collation) : string

Obtain DBMS specific SQL code portion needed to set the COLLATION
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::prefersIdentityColumns () : bool

Whether the platform prefers identity columns (eg. autoincrement) for ID generation.
Subclasses should override this method to return TRUE if they prefer identity columns.

MySql prefers "autoincrement" identity columns since sequences can only
be emulated with a table.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::supportsIdentityColumns () : bool

Whether the platform supports identity columns.

Identity columns are columns that receive an auto-generated value from the
database on insert of a row.

MySql supports this through AUTO_INCREMENT columns.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::supportsInlineColumnComments () : bool

Whether this platform support to add inline column comments as postfix.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::supportsColumnCollation () : bool

Does this platform support column collation?

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getListTablesSQL () : string

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getListTableColumnsSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getListTableMetadataSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getCreateDatabaseSQL ($name) : string

Returns the SQL to create a new database.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDropDatabaseSQL ($name) : string

Returns the SQL snippet to drop an existing database.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::_getCreateTableSQL ($tableName, $columns, $options = []) : string[]

Returns the SQL used to create a table.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDefaultValueDeclarationSQL ($field) : string

Obtains DBMS specific SQL code portion needed to set a default value
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getAlterTableSQL ($diff) : string[]

Gets the SQL statements for altering an existing table.

This method returns an array of SQL statements, since some platforms need several statements.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getPreAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getPreAlterTableRenameIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getPostAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getPostAlterTableRenameIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getCreateIndexSQLFlags ($index) : string

Adds additional flags for index generation.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getIntegerTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a 4 byte integer column.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getBigIntTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares an 8 byte integer column.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getSmallIntTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a 2 byte integer column.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getFloatDeclarationSQL ($field) : string

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDecimalTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a floating point column of arbitrary precision.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::_getCommonIntegerTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares common properties of an integer column.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getColumnCharsetDeclarationSQL ($charset) : string

Obtains DBMS specific SQL code portion needed to set the CHARACTER SET
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getColumnCollationDeclarationSQL ($collation) : string

Obtains DBMS specific SQL code portion needed to set the COLLATION
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getAdvancedForeignKeyOptionsSQL ($foreignKey) : string

Returns the FOREIGN KEY query section dealing with non-standard options
as MATCH, INITIALLY DEFERRED, ON UPDATE, ...

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDropIndexSQL ($index, $table = null) : string

Returns the SQL to drop an index from a table.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDropPrimaryKeySQL ($table) : string

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getSetTransactionIsolationSQL ($level) : string

Returns the SQL to set the transaction isolation level.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getName () : string

Gets the name of the platform.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getReadLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which locks rows in shared read lock.

This defaults to the ANSI SQL "FOR UPDATE", which is an exclusive lock (Write). Some database
vendors allow to lighten this constraint up to be a real read lock.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getVarcharMaxLength () : int

Gets the maximum length of a varchar field.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getBinaryMaxLength () : int

Gets the maximum length of a binary field.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDropTemporaryTableSQL ($table) : string

Returns the SQL to safely drop a temporary table WITHOUT implicitly committing an open transaction.

MySQL commits a transaction implicitly when DROP TABLE is executed, however not
if DROP TEMPORARY TABLE is executed.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getBlobTypeDeclarationSQL ($field) : string

Gets the SQL Snippet used to declare a BLOB column type.

TINYBLOB   : 2 ^  8 - 1 = 255
BLOB       : 2 ^ 16 - 1 = 65535
MEDIUMBLOB : 2 ^ 24 - 1 = 16777215
LONGBLOB   : 2 ^ 32 - 1 = 4294967295

Returns the SQL Snippet used to declare a BLOB column type.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::quoteStringLiteral ($str) : string

Quotes a literal string.
This method is NOT meant to fix SQL injections!
It is only meant to escape this platform's string literal
quote character inside the given literal string.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDefaultTransactionIsolationLevel () : int

Gets the default transaction isolation level of the platform.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::supportsColumnLengthIndexes () : bool

Whether the platform supports indexes with column length definitions.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::__construct () : void

method Doctrine\DBAL\Platforms\MariaDb1027Platform::setEventManager ($eventManager) : void

Sets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getEventManager () : Doctrine\Common\EventManager

Gets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getVarcharTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a VARCHAR column type.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getBinaryTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getGuidTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a GUID/UUID field.

By default this maps directly to a CHAR(36) and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::registerDoctrineTypeMapping ($dbType, $doctrineType) : void

Registers a doctrine type to be used in conjunction with a column type of this platform.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDoctrineTypeMapping ($dbType) : string

Gets the Doctrine type that is mapped for the given database column type.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::hasDoctrineTypeMappingFor ($dbType) : bool

Checks if a database type is currently supported by this platform.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::initializeCommentedDoctrineTypes () : void

Initializes the Doctrine Type comments instance variable for in_array() checks.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::isCommentedDoctrineType ($doctrineType) : bool

Is it necessary for the platform to add a parsable type comment to allow reverse engineering the given type?

method Doctrine\DBAL\Platforms\MariaDb1027Platform::markDoctrineTypeCommented ($doctrineType) : void

Marks this type as to be commented in ALTER TABLE and CREATE TABLE statements.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDoctrineTypeComment ($doctrineType) : string

Gets the comment to append to a column comment that helps parsing this type in reverse engineering.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getColumnComment ($column) : stringnull

Gets the comment of a passed column modified by potential doctrine type comment hints.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getSqlCommentStartString () : string

Gets the string portion that starts an SQL comment.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getSqlCommentEndString () : string

Gets the string portion that ends an SQL comment.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getCharMaxLength () : int

Gets the maximum length of a char field.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getVarcharDefaultLength () : int

Gets the default length of a varchar field.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getBinaryDefaultLength () : int

Gets the default length of a binary field.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getWildcards () : string[]

Gets all SQL wildcard characters of the platform.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getAvgExpression ($column) : string

Returns the SQL snippet to get the average value of a column.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getCountExpression ($column) : string

Returns the SQL snippet to get the number of rows (without a NULL value) of a column.

If a '*' is used instead of a column the number of selected rows is returned.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getMaxExpression ($column) : string

Returns the SQL snippet to get the highest value of a column.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getMinExpression ($column) : string

Returns the SQL snippet to get the lowest value of a column.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getSumExpression ($column) : string

Returns the SQL snippet to get the total sum of a column.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getMd5Expression ($column) : string

Returns the SQL snippet to get the md5 sum of a field.

Note: Not SQL92, but common functionality.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getLengthExpression ($column) : string

Returns the SQL snippet to get the length of a text field.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getSqrtExpression ($column) : string

Returns the SQL snippet to get the squared value of a column.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getRoundExpression ($column, $decimals = 0) : string

Returns the SQL snippet to round a numeric field to the number of decimals specified.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getModExpression ($expression1, $expression2) : string

Returns the SQL snippet to get the remainder of the division operation $expression1 / $expression2.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getTrimExpression ($str, $mode = Doctrine\DBAL\Platforms\TrimMode::UNSPECIFIED, $char = false) : string

Returns the SQL snippet to trim a string.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getRtrimExpression ($str) : string

Returns the SQL snippet to trim trailing space characters from the expression.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getLtrimExpression ($str) : string

Returns the SQL snippet to trim leading space characters from the expression.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getUpperExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to uppercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getLowerExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to lowercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getNowExpression () : string

Returns the SQL snippet to get the current system date.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getSubstringExpression ($value, $from, $length = null) : string

Returns a SQL snippet to get a substring inside an SQL statement.

Note: Not SQL92, but common functionality.

SQLite only supports the 2 parameter variant of this function.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getNotExpression ($expression) : string

Returns the SQL for a logical not.

Example:

$q = new Doctrine_Query();
$e = $q->expr;
$q->select('*')->from('table')
->where($e->eq('id', $e->not('null'));

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getIsNullExpression ($expression) : string

Returns the SQL that checks if an expression is null.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getIsNotNullExpression ($expression) : string

Returns the SQL that checks if an expression is not null.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getBetweenExpression ($expression, $value1, $value2) : string

Returns the SQL that checks if an expression evaluates to a value between two values.

The parameter $expression is checked if it is between $value1 and $value2.

Note: There is a slight difference in the way BETWEEN works on some databases.
http://www.w3schools.com/sql/sql_between.asp. If you want complete database
independence you should avoid using between().

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getAcosExpression ($value) : string

Returns the SQL to get the arccosine of a value.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getSinExpression ($value) : string

Returns the SQL to get the sine of a value.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getPiExpression () : string

Returns the SQL to get the PI value.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getCosExpression ($value) : string

Returns the SQL to get the cosine of a value.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDateAddSecondsExpression ($date, $seconds) : string

Returns the SQL to add the number of given seconds to a date.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDateSubSecondsExpression ($date, $seconds) : string

Returns the SQL to subtract the number of given seconds from a date.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDateAddMinutesExpression ($date, $minutes) : string

Returns the SQL to add the number of given minutes to a date.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDateSubMinutesExpression ($date, $minutes) : string

Returns the SQL to subtract the number of given minutes from a date.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDateAddHourExpression ($date, $hours) : string

Returns the SQL to add the number of given hours to a date.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDateSubHourExpression ($date, $hours) : string

Returns the SQL to subtract the number of given hours to a date.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDateAddDaysExpression ($date, $days) : string

Returns the SQL to add the number of given days to a date.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDateSubDaysExpression ($date, $days) : string

Returns the SQL to subtract the number of given days to a date.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDateAddWeeksExpression ($date, $weeks) : string

Returns the SQL to add the number of given weeks to a date.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDateSubWeeksExpression ($date, $weeks) : string

Returns the SQL to subtract the number of given weeks from a date.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDateAddMonthExpression ($date, $months) : string

Returns the SQL to add the number of given months to a date.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDateSubMonthExpression ($date, $months) : string

Returns the SQL to subtract the number of given months to a date.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDateAddQuartersExpression ($date, $quarters) : string

Returns the SQL to add the number of given quarters to a date.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDateSubQuartersExpression ($date, $quarters) : string

Returns the SQL to subtract the number of given quarters from a date.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDateAddYearsExpression ($date, $years) : string

Returns the SQL to add the number of given years to a date.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDateSubYearsExpression ($date, $years) : string

Returns the SQL to subtract the number of given years from a date.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getBitAndComparisonExpression ($value1, $value2) : string

Returns the SQL bit AND comparison expression.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getBitOrComparisonExpression ($value1, $value2) : string

Returns the SQL bit OR comparison expression.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getForUpdateSQL () : string

Returns the FOR UPDATE expression.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::appendLockHint ($fromClause, $lockMode) : string

Honors that some SQL vendors such as MsSql use table hints for locking instead of the ANSI SQL FOR UPDATE specification.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getWriteLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which obtains an exclusive lock on the rows.

The semantics of this lock mode should equal the SELECT .. FOR UPDATE of the ANSI SQL standard.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDropTableSQL ($table) : string

Returns the SQL snippet to drop an existing table.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDropConstraintSQL ($constraint, $table) : string

Returns the SQL to drop a constraint.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDropForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to drop a foreign key.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getCreateTableSQL ($table, $createFlags = self::CREATE_INDEXES) : string[]

Returns the SQL statement(s) to create a table with the specified name, columns and constraints
on this platform.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getCommentOnTableSQL ($tableName, $comment) : string

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getCommentOnColumnSQL ($tableName, $columnName, $comment) : string

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getInlineColumnCommentSQL ($comment) : string

Returns the SQL to create inline comment on a column.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getCreateTemporaryTableSnippetSQL () : string

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getCreateSequenceSQL ($sequence) : string

Returns the SQL to create a sequence on this platform.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getAlterSequenceSQL ($sequence) : string

Returns the SQL to change a sequence on this platform.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getCreateConstraintSQL ($constraint, $table) : string

Returns the SQL to create a constraint on a table on this platform.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getCreateIndexSQL ($index, $table) : string

Returns the SQL to create an index on a table on this platform.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getPartialIndexSQL ($index) : string

Adds condition for partial index.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getCreatePrimaryKeySQL ($index, $table) : string

Returns the SQL to create an unnamed primary key constraint.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getCreateSchemaSQL ($schemaName) : string

Returns the SQL to create a named schema.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::quoteIdentifier ($str) : string

Quotes a string so that it can be safely used as a table or column name,
even if it is a reserved word of the platform. This also detects identifier
chains separated by dot and quotes them independently.

NOTE: Just because you CAN use quoted identifiers doesn't mean
you SHOULD use them. In general, they end up causing way more
problems than they solve.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::quoteSingleIdentifier ($str) : string

Quotes a single identifier (no dot chain separation).

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getCreateForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to create a new foreign key.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::onSchemaAlterTableAddColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\MariaDb1027Platform::onSchemaAlterTableRemoveColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\MariaDb1027Platform::onSchemaAlterTableChangeColumn ($columnDiff, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\MariaDb1027Platform::onSchemaAlterTableRenameColumn ($oldColumnName, $column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\MariaDb1027Platform::onSchemaAlterTable ($diff, &$sql) : bool

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getRenameIndexSQL ($oldIndexName, $index, $tableName) : string[]

Returns the SQL for renaming an index on a table.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::_getAlterTableIndexForeignKeySQL ($diff) : string[]

Common code for alter table statement generation that updates the changed Index and Foreign Key definitions.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getColumnDeclarationListSQL ($fields) : string

Gets declaration of a number of fields in bulk.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getColumnDeclarationSQL ($name, $field) : string

Obtains DBMS specific SQL code portion needed to declare a generic type
field to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getCheckDeclarationSQL ($definition) : string

Obtains DBMS specific SQL code portion needed to set a CHECK constraint
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getUniqueConstraintDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set a unique
constraint declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getIndexDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getCustomTypeDeclarationSQL ($columnDef) : string

Obtains SQL code portion needed to create a custom column,
e.g. when a field has the "columnDefinition" keyword.
Only "AUTOINCREMENT" and "PRIMARY KEY" are added if appropriate.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getIndexFieldDeclarationListSQL ($columnsOrIndex) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getTemporaryTableSQL () : string

Returns the required SQL string that fits between CREATE ... TABLE
to create the table as a temporary table.

Should be overridden in driver classes to return the correct string for the
specific database type.

The default is to return the string "TEMPORARY" - this will result in a
SQL error for any database that does not support temporary tables, or that
requires a different SQL command from "CREATE TEMPORARY TABLE".

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getTemporaryTableName ($tableName) : string

Some vendors require temporary table names to be qualified specially.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getForeignKeyDeclarationSQL ($foreignKey) : string

Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getForeignKeyReferentialActionSQL ($action) : string

Returns the given referential action in uppercase if valid, otherwise throws an exception.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getForeignKeyBaseDeclarationSQL ($foreignKey) : string

Obtains DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getUniqueFieldDeclarationSQL () : string

Obtains DBMS specific SQL code portion needed to set the UNIQUE constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::prefersSequences () : bool

Whether the platform prefers sequences for ID generation.
Subclasses should override this method to return TRUE if they prefer sequences.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::convertBooleans ($item) : mixed

Some platforms need the boolean values to be converted.

The default conversion in this implementation converts to integers (false => 0, true => 1).

Note: if the input is not a boolean the original input might be returned.

There are two contexts when converting booleans: Literals and Prepared Statements.
This method should handle the literal case

method Doctrine\DBAL\Platforms\MariaDb1027Platform::convertFromBoolean ($item) : boolnull

Some platforms have boolean literals that needs to be correctly converted

The default conversion tries to convert value into bool "(bool)$item"

method Doctrine\DBAL\Platforms\MariaDb1027Platform::convertBooleansToDatabaseValue ($item) : mixed

This method should handle the prepared statements case. When there is no
distinction, it's OK to use the same method.

Note: if the input is not a boolean the original input might be returned.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getCurrentDateSQL () : string

Returns the SQL specific for the platform to get the current date.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getCurrentTimeSQL () : string

Returns the SQL specific for the platform to get the current time.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getCurrentTimestampSQL () : string

Returns the SQL specific for the platform to get the current timestamp

method Doctrine\DBAL\Platforms\MariaDb1027Platform::_getTransactionIsolationLevelSQL ($level) : string

Returns the SQL for a given transaction isolation level Connection constant.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getListNamespacesSQL () : string

Returns the SQL statement for retrieving the namespaces defined in the database.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getListSequencesSQL ($database) : string

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getListUsersSQL () : string

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDropSequenceSQL ($sequence) : string

Returns the SQL snippet to drop an existing sequence.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getSequenceNextValSQL ($sequenceName) : string

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDateTimeTzTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime with timezone offset fields.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::supportsSequences () : bool

Whether the platform supports sequences.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::usesSequenceEmulatedIdentityColumns () : bool

Whether the platform emulates identity columns through sequences.

Some platforms that do not support identity columns natively
but support sequences can emulate identity columns by using
sequences.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getIdentitySequenceName ($tableName, $columnName) : string

Returns the name of the sequence for a particular identity column in a particular table.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::supportsIndexes () : bool

Whether the platform supports indexes.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::supportsPartialIndexes () : bool

Whether the platform supports partial indexes.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::supportsAlterTable () : bool

Whether the platform supports altering tables.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::supportsTransactions () : bool

Whether the platform supports transactions.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::supportsSavepoints () : bool

Whether the platform supports savepoints.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::supportsReleaseSavepoints () : bool

Whether the platform supports releasing savepoints.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::supportsPrimaryConstraints () : bool

Whether the platform supports primary key constraints.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::supportsForeignKeyConstraints () : bool

Whether the platform supports foreign key constraints.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::supportsForeignKeyOnUpdate () : bool

Whether this platform supports onUpdate in foreign key constraints.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::supportsSchemas () : bool

Whether the platform supports database schemas.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::canEmulateSchemas () : bool

Whether this platform can emulate schemas.

Platforms that either support or emulate schemas don't automatically
filter a schema for the namespaced elements in {@link
AbstractManager#createSchema}.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDefaultSchemaName () : string

Returns the default schema name.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::supportsCreateDropDatabase () : bool

Whether this platform supports create database.

Some databases don't allow to create and drop databases at all or only with certain tools.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::supportsGettingAffectedRows () : bool

Whether the platform supports getting the affected rows of a recent update/delete type query.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::supportsCommentOnStatement () : bool

Whether this platform support the proprietary syntax "COMMENT ON asset".

method Doctrine\DBAL\Platforms\MariaDb1027Platform::hasNativeGuidType () : bool

Does this platform have native guid type.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::hasNativeJsonType () : bool

Does this platform have native JSON type.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getIdentityColumnNullInsertSQL () : void

method Doctrine\DBAL\Platforms\MariaDb1027Platform::supportsViews () : bool

Whether this platform supports views.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDateTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime value of this platform.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDateTimeTzFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime with timezone value of this platform.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDateFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored date value of this platform.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored time value of this platform.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::modifyLimitQuery ($query, $limit, $offset = null) : string

Adds an driver-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::supportsLimitOffset () : bool

Whether the database platform support offsets in modify limit clauses.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getSQLResultCasing ($column) : string

Gets the character casing of a column in an SQL result set of this platform.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::fixSchemaElementName ($schemaElementName) : string

Makes any fixes to a name of a schema element (table, sequence, ...) that are required
by restrictions of the platform, like a maximum length.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getMaxIdentifierLength () : int

Maximum length of any given database identifier, like tables or column names.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getEmptyIdentityInsertSQL ($tableName, $identifierColumnName) : string

Returns the insert SQL for an empty insert statement.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getTruncateTableSQL ($tableName, $cascade = false) : string

Generates a Truncate Table SQL statement for a given table.

Cascade is not supported on many platforms but would optionally cascade the truncate by
following the foreign keys.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getDummySelectSQL () : string

This is for test reasons, many vendors have special requirements for dummy statements.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::createSavePoint ($savepoint) : string

Returns the SQL to create a new savepoint.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::releaseSavePoint ($savepoint) : string

Returns the SQL to release a savepoint.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::rollbackSavePoint ($savepoint) : string

Returns the SQL to rollback a savepoint.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getReservedKeywordsList () : Doctrine\DBAL\Platforms\Keywords\KeywordList

Returns the keyword list instance of this platform.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getStringLiteralQuoteCharacter () : string

Gets the character used for string literal quoting.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::escapeStringForLike ($inputString, $escapeChar) : string

Escapes metacharacters in a string intended to be used with a LIKE
operator.

method Doctrine\DBAL\Platforms\MariaDb1027Platform::getLikeWildcardCharacters () : string

class Doctrine\DBAL\Platforms::MySQL57Platform

Provides the behavior, features and SQL dialect of the MySQL 5.7 (5.7.9 GA) database platform.

classconstant integer Doctrine\DBAL\Platforms\MySQL57Platform::LENGTH_LIMIT_TINYTEXT

classconstant integer Doctrine\DBAL\Platforms\MySQL57Platform::LENGTH_LIMIT_TEXT

classconstant integer Doctrine\DBAL\Platforms\MySQL57Platform::LENGTH_LIMIT_MEDIUMTEXT

classconstant integer Doctrine\DBAL\Platforms\MySQL57Platform::LENGTH_LIMIT_TINYBLOB

classconstant integer Doctrine\DBAL\Platforms\MySQL57Platform::LENGTH_LIMIT_BLOB

classconstant integer Doctrine\DBAL\Platforms\MySQL57Platform::LENGTH_LIMIT_MEDIUMBLOB

classconstant integer Doctrine\DBAL\Platforms\MySQL57Platform::CREATE_INDEXES

classconstant integer Doctrine\DBAL\Platforms\MySQL57Platform::CREATE_FOREIGNKEYS

classconstant string Doctrine\DBAL\Platforms\MySQL57Platform::DATE_INTERVAL_UNIT_SECOND

classconstant string Doctrine\DBAL\Platforms\MySQL57Platform::DATE_INTERVAL_UNIT_MINUTE

classconstant string Doctrine\DBAL\Platforms\MySQL57Platform::DATE_INTERVAL_UNIT_HOUR

classconstant string Doctrine\DBAL\Platforms\MySQL57Platform::DATE_INTERVAL_UNIT_DAY

classconstant string Doctrine\DBAL\Platforms\MySQL57Platform::DATE_INTERVAL_UNIT_WEEK

classconstant string Doctrine\DBAL\Platforms\MySQL57Platform::DATE_INTERVAL_UNIT_MONTH

classconstant string Doctrine\DBAL\Platforms\MySQL57Platform::DATE_INTERVAL_UNIT_QUARTER

classconstant string Doctrine\DBAL\Platforms\MySQL57Platform::DATE_INTERVAL_UNIT_YEAR

classconstant integer Doctrine\DBAL\Platforms\MySQL57Platform::TRIM_UNSPECIFIED

classconstant integer Doctrine\DBAL\Platforms\MySQL57Platform::TRIM_LEADING

classconstant integer Doctrine\DBAL\Platforms\MySQL57Platform::TRIM_TRAILING

classconstant integer Doctrine\DBAL\Platforms\MySQL57Platform::TRIM_BOTH

property string[]null Doctrine\DBAL\Platforms\MySQL57Platform::doctrineTypeMapping

property string[]null Doctrine\DBAL\Platforms\MySQL57Platform::doctrineTypeComments

Contains a list of all columns that should generate parseable column comments for type-detection
in reverse engineering scenarios.

property Doctrine\Common\EventManager Doctrine\DBAL\Platforms\MySQL57Platform::_eventManager

property Doctrine\DBAL\Platforms\Keywords\KeywordListnull Doctrine\DBAL\Platforms\MySQL57Platform::_keywords

Holds the KeywordList instance for the current platform.

method Doctrine\DBAL\Platforms\MySQL57Platform::hasNativeJsonType () : bool

Does this platform have native JSON type.

method Doctrine\DBAL\Platforms\MySQL57Platform::getJsonTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a JSON field.

By default this maps directly to a CLOB and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\MySQL57Platform::getPreAlterTableRenameIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\MySQL57Platform::getPostAlterTableRenameIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\MySQL57Platform::getRenameIndexSQL ($oldIndexName, $index, $tableName) : string[]

Returns the SQL for renaming an index on a table.

method Doctrine\DBAL\Platforms\MySQL57Platform::getReservedKeywordsClass () : string

Returns the class name of the reserved keywords list.

method Doctrine\DBAL\Platforms\MySQL57Platform::initializeDoctrineTypeMappings () : void

Lazy load Doctrine Type Mappings.

method Doctrine\DBAL\Platforms\MySQL57Platform::doModifyLimitQuery ($query, $limit, $offset) : string

Adds an platform-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\MySQL57Platform::getIdentifierQuoteCharacter () : string

Gets the character used for identifier quoting.

method Doctrine\DBAL\Platforms\MySQL57Platform::getRegexpExpression () : string

Returns the regular expression operator.

method Doctrine\DBAL\Platforms\MySQL57Platform::getGuidExpression () : string

Returns the global unique identifier expression.

method Doctrine\DBAL\Platforms\MySQL57Platform::getLocateExpression ($str, $substr, $startPos = false) : string

Returns the SQL snippet to get the position of the first occurrence of substring $substr in string $str.

method Doctrine\DBAL\Platforms\MySQL57Platform::getConcatExpression () : string

Returns a SQL snippet to concatenate the given expressions.

Accepts an arbitrary number of string parameters. Each parameter must contain an expression.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDateArithmeticIntervalExpression ($date, $operator, $interval, $unit) : string

Returns the SQL for a date arithmetic expression.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDateDiffExpression ($date1, $date2) : string

Returns the SQL to calculate the difference in days between the two passed dates.

Computes diff = date1 - date2.

method Doctrine\DBAL\Platforms\MySQL57Platform::getListDatabasesSQL () : string

method Doctrine\DBAL\Platforms\MySQL57Platform::getListTableConstraintsSQL ($table) : string

method Doctrine\DBAL\Platforms\MySQL57Platform::getListTableIndexesSQL ($table, $currentDatabase = null) : string

Returns the list of indexes for the current database.

The current database parameter is optional but will always be passed
when using the SchemaManager API and is the database the given table is in.

Attention: Some platforms only support currentDatabase when they
are connected with that database. Cross-database information schema
requests may be impossible.

Two approaches to listing the table indexes. The information_schema is
preferred, because it doesn't cause problems with SQL keywords such as "order" or "table".

method Doctrine\DBAL\Platforms\MySQL57Platform::getListViewsSQL ($database) : string

Returns the SQL to list all views of a database or user.

method Doctrine\DBAL\Platforms\MySQL57Platform::getListTableForeignKeysSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\MySQL57Platform::getCreateViewSQL ($name, $sql) : string

method Doctrine\DBAL\Platforms\MySQL57Platform::getDropViewSQL ($name) : string

method Doctrine\DBAL\Platforms\MySQL57Platform::getVarcharTypeDeclarationSQLSnippet ($length, $fixed) : string

method Doctrine\DBAL\Platforms\MySQL57Platform::getBinaryTypeDeclarationSQLSnippet ($length, $fixed) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\MySQL57Platform::getClobTypeDeclarationSQL ($field) : string

Gets the SQL snippet used to declare a CLOB column type.

TINYTEXT   : 2 ^  8 - 1 = 255
TEXT       : 2 ^ 16 - 1 = 65535
MEDIUMTEXT : 2 ^ 24 - 1 = 16777215
LONGTEXT   : 2 ^ 32 - 1 = 4294967295

Returns the SQL snippet used to declare a CLOB column type.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDateTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime fields in
statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDateTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create date fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySQL57Platform::getTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create time fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySQL57Platform::getBooleanTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a boolean column.

method Doctrine\DBAL\Platforms\MySQL57Platform::getCollationFieldDeclaration ($collation) : string

Obtain DBMS specific SQL code portion needed to set the COLLATION
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySQL57Platform::prefersIdentityColumns () : bool

Whether the platform prefers identity columns (eg. autoincrement) for ID generation.
Subclasses should override this method to return TRUE if they prefer identity columns.

MySql prefers "autoincrement" identity columns since sequences can only
be emulated with a table.

method Doctrine\DBAL\Platforms\MySQL57Platform::supportsIdentityColumns () : bool

Whether the platform supports identity columns.

Identity columns are columns that receive an auto-generated value from the
database on insert of a row.

MySql supports this through AUTO_INCREMENT columns.

method Doctrine\DBAL\Platforms\MySQL57Platform::supportsInlineColumnComments () : bool

Whether this platform support to add inline column comments as postfix.

method Doctrine\DBAL\Platforms\MySQL57Platform::supportsColumnCollation () : bool

Does this platform support column collation?

method Doctrine\DBAL\Platforms\MySQL57Platform::getListTablesSQL () : string

method Doctrine\DBAL\Platforms\MySQL57Platform::getListTableColumnsSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\MySQL57Platform::getListTableMetadataSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\MySQL57Platform::getCreateDatabaseSQL ($name) : string

Returns the SQL to create a new database.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDropDatabaseSQL ($name) : string

Returns the SQL snippet to drop an existing database.

method Doctrine\DBAL\Platforms\MySQL57Platform::_getCreateTableSQL ($tableName, $columns, $options = []) : string[]

Returns the SQL used to create a table.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDefaultValueDeclarationSQL ($field) : string

Obtains DBMS specific SQL code portion needed to set a default value
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySQL57Platform::getAlterTableSQL ($diff) : string[]

Gets the SQL statements for altering an existing table.

This method returns an array of SQL statements, since some platforms need several statements.

method Doctrine\DBAL\Platforms\MySQL57Platform::getPreAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\MySQL57Platform::getPostAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\MySQL57Platform::getCreateIndexSQLFlags ($index) : string

Adds additional flags for index generation.

method Doctrine\DBAL\Platforms\MySQL57Platform::getIntegerTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a 4 byte integer column.

method Doctrine\DBAL\Platforms\MySQL57Platform::getBigIntTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares an 8 byte integer column.

method Doctrine\DBAL\Platforms\MySQL57Platform::getSmallIntTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a 2 byte integer column.

method Doctrine\DBAL\Platforms\MySQL57Platform::getFloatDeclarationSQL ($field) : string

method Doctrine\DBAL\Platforms\MySQL57Platform::getDecimalTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a floating point column of arbitrary precision.

method Doctrine\DBAL\Platforms\MySQL57Platform::_getCommonIntegerTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares common properties of an integer column.

method Doctrine\DBAL\Platforms\MySQL57Platform::getColumnCharsetDeclarationSQL ($charset) : string

Obtains DBMS specific SQL code portion needed to set the CHARACTER SET
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySQL57Platform::getColumnCollationDeclarationSQL ($collation) : string

Obtains DBMS specific SQL code portion needed to set the COLLATION
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySQL57Platform::getAdvancedForeignKeyOptionsSQL ($foreignKey) : string

Returns the FOREIGN KEY query section dealing with non-standard options
as MATCH, INITIALLY DEFERRED, ON UPDATE, ...

method Doctrine\DBAL\Platforms\MySQL57Platform::getDropIndexSQL ($index, $table = null) : string

Returns the SQL to drop an index from a table.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDropPrimaryKeySQL ($table) : string

method Doctrine\DBAL\Platforms\MySQL57Platform::getSetTransactionIsolationSQL ($level) : string

Returns the SQL to set the transaction isolation level.

method Doctrine\DBAL\Platforms\MySQL57Platform::getName () : string

Gets the name of the platform.

method Doctrine\DBAL\Platforms\MySQL57Platform::getReadLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which locks rows in shared read lock.

This defaults to the ANSI SQL "FOR UPDATE", which is an exclusive lock (Write). Some database
vendors allow to lighten this constraint up to be a real read lock.

method Doctrine\DBAL\Platforms\MySQL57Platform::getVarcharMaxLength () : int

Gets the maximum length of a varchar field.

method Doctrine\DBAL\Platforms\MySQL57Platform::getBinaryMaxLength () : int

Gets the maximum length of a binary field.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDropTemporaryTableSQL ($table) : string

Returns the SQL to safely drop a temporary table WITHOUT implicitly committing an open transaction.

MySQL commits a transaction implicitly when DROP TABLE is executed, however not
if DROP TEMPORARY TABLE is executed.

method Doctrine\DBAL\Platforms\MySQL57Platform::getBlobTypeDeclarationSQL ($field) : string

Gets the SQL Snippet used to declare a BLOB column type.

TINYBLOB   : 2 ^  8 - 1 = 255
BLOB       : 2 ^ 16 - 1 = 65535
MEDIUMBLOB : 2 ^ 24 - 1 = 16777215
LONGBLOB   : 2 ^ 32 - 1 = 4294967295

Returns the SQL Snippet used to declare a BLOB column type.

method Doctrine\DBAL\Platforms\MySQL57Platform::quoteStringLiteral ($str) : string

Quotes a literal string.
This method is NOT meant to fix SQL injections!
It is only meant to escape this platform's string literal
quote character inside the given literal string.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDefaultTransactionIsolationLevel () : int

Gets the default transaction isolation level of the platform.

method Doctrine\DBAL\Platforms\MySQL57Platform::supportsColumnLengthIndexes () : bool

Whether the platform supports indexes with column length definitions.

method Doctrine\DBAL\Platforms\MySQL57Platform::__construct () : void

method Doctrine\DBAL\Platforms\MySQL57Platform::setEventManager ($eventManager) : void

Sets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\MySQL57Platform::getEventManager () : Doctrine\Common\EventManager

Gets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\MySQL57Platform::getVarcharTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a VARCHAR column type.

method Doctrine\DBAL\Platforms\MySQL57Platform::getBinaryTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\MySQL57Platform::getGuidTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a GUID/UUID field.

By default this maps directly to a CHAR(36) and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\MySQL57Platform::registerDoctrineTypeMapping ($dbType, $doctrineType) : void

Registers a doctrine type to be used in conjunction with a column type of this platform.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDoctrineTypeMapping ($dbType) : string

Gets the Doctrine type that is mapped for the given database column type.

method Doctrine\DBAL\Platforms\MySQL57Platform::hasDoctrineTypeMappingFor ($dbType) : bool

Checks if a database type is currently supported by this platform.

method Doctrine\DBAL\Platforms\MySQL57Platform::initializeCommentedDoctrineTypes () : void

Initializes the Doctrine Type comments instance variable for in_array() checks.

method Doctrine\DBAL\Platforms\MySQL57Platform::isCommentedDoctrineType ($doctrineType) : bool

Is it necessary for the platform to add a parsable type comment to allow reverse engineering the given type?

method Doctrine\DBAL\Platforms\MySQL57Platform::markDoctrineTypeCommented ($doctrineType) : void

Marks this type as to be commented in ALTER TABLE and CREATE TABLE statements.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDoctrineTypeComment ($doctrineType) : string

Gets the comment to append to a column comment that helps parsing this type in reverse engineering.

method Doctrine\DBAL\Platforms\MySQL57Platform::getColumnComment ($column) : stringnull

Gets the comment of a passed column modified by potential doctrine type comment hints.

method Doctrine\DBAL\Platforms\MySQL57Platform::getSqlCommentStartString () : string

Gets the string portion that starts an SQL comment.

method Doctrine\DBAL\Platforms\MySQL57Platform::getSqlCommentEndString () : string

Gets the string portion that ends an SQL comment.

method Doctrine\DBAL\Platforms\MySQL57Platform::getCharMaxLength () : int

Gets the maximum length of a char field.

method Doctrine\DBAL\Platforms\MySQL57Platform::getVarcharDefaultLength () : int

Gets the default length of a varchar field.

method Doctrine\DBAL\Platforms\MySQL57Platform::getBinaryDefaultLength () : int

Gets the default length of a binary field.

method Doctrine\DBAL\Platforms\MySQL57Platform::getWildcards () : string[]

Gets all SQL wildcard characters of the platform.

method Doctrine\DBAL\Platforms\MySQL57Platform::getAvgExpression ($column) : string

Returns the SQL snippet to get the average value of a column.

method Doctrine\DBAL\Platforms\MySQL57Platform::getCountExpression ($column) : string

Returns the SQL snippet to get the number of rows (without a NULL value) of a column.

If a '*' is used instead of a column the number of selected rows is returned.

method Doctrine\DBAL\Platforms\MySQL57Platform::getMaxExpression ($column) : string

Returns the SQL snippet to get the highest value of a column.

method Doctrine\DBAL\Platforms\MySQL57Platform::getMinExpression ($column) : string

Returns the SQL snippet to get the lowest value of a column.

method Doctrine\DBAL\Platforms\MySQL57Platform::getSumExpression ($column) : string

Returns the SQL snippet to get the total sum of a column.

method Doctrine\DBAL\Platforms\MySQL57Platform::getMd5Expression ($column) : string

Returns the SQL snippet to get the md5 sum of a field.

Note: Not SQL92, but common functionality.

method Doctrine\DBAL\Platforms\MySQL57Platform::getLengthExpression ($column) : string

Returns the SQL snippet to get the length of a text field.

method Doctrine\DBAL\Platforms\MySQL57Platform::getSqrtExpression ($column) : string

Returns the SQL snippet to get the squared value of a column.

method Doctrine\DBAL\Platforms\MySQL57Platform::getRoundExpression ($column, $decimals = 0) : string

Returns the SQL snippet to round a numeric field to the number of decimals specified.

method Doctrine\DBAL\Platforms\MySQL57Platform::getModExpression ($expression1, $expression2) : string

Returns the SQL snippet to get the remainder of the division operation $expression1 / $expression2.

method Doctrine\DBAL\Platforms\MySQL57Platform::getTrimExpression ($str, $mode = Doctrine\DBAL\Platforms\TrimMode::UNSPECIFIED, $char = false) : string

Returns the SQL snippet to trim a string.

method Doctrine\DBAL\Platforms\MySQL57Platform::getRtrimExpression ($str) : string

Returns the SQL snippet to trim trailing space characters from the expression.

method Doctrine\DBAL\Platforms\MySQL57Platform::getLtrimExpression ($str) : string

Returns the SQL snippet to trim leading space characters from the expression.

method Doctrine\DBAL\Platforms\MySQL57Platform::getUpperExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to uppercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\MySQL57Platform::getLowerExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to lowercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\MySQL57Platform::getNowExpression () : string

Returns the SQL snippet to get the current system date.

method Doctrine\DBAL\Platforms\MySQL57Platform::getSubstringExpression ($value, $from, $length = null) : string

Returns a SQL snippet to get a substring inside an SQL statement.

Note: Not SQL92, but common functionality.

SQLite only supports the 2 parameter variant of this function.

method Doctrine\DBAL\Platforms\MySQL57Platform::getNotExpression ($expression) : string

Returns the SQL for a logical not.

Example:

$q = new Doctrine_Query();
$e = $q->expr;
$q->select('*')->from('table')
->where($e->eq('id', $e->not('null'));

method Doctrine\DBAL\Platforms\MySQL57Platform::getIsNullExpression ($expression) : string

Returns the SQL that checks if an expression is null.

method Doctrine\DBAL\Platforms\MySQL57Platform::getIsNotNullExpression ($expression) : string

Returns the SQL that checks if an expression is not null.

method Doctrine\DBAL\Platforms\MySQL57Platform::getBetweenExpression ($expression, $value1, $value2) : string

Returns the SQL that checks if an expression evaluates to a value between two values.

The parameter $expression is checked if it is between $value1 and $value2.

Note: There is a slight difference in the way BETWEEN works on some databases.
http://www.w3schools.com/sql/sql_between.asp. If you want complete database
independence you should avoid using between().

method Doctrine\DBAL\Platforms\MySQL57Platform::getAcosExpression ($value) : string

Returns the SQL to get the arccosine of a value.

method Doctrine\DBAL\Platforms\MySQL57Platform::getSinExpression ($value) : string

Returns the SQL to get the sine of a value.

method Doctrine\DBAL\Platforms\MySQL57Platform::getPiExpression () : string

Returns the SQL to get the PI value.

method Doctrine\DBAL\Platforms\MySQL57Platform::getCosExpression ($value) : string

Returns the SQL to get the cosine of a value.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDateAddSecondsExpression ($date, $seconds) : string

Returns the SQL to add the number of given seconds to a date.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDateSubSecondsExpression ($date, $seconds) : string

Returns the SQL to subtract the number of given seconds from a date.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDateAddMinutesExpression ($date, $minutes) : string

Returns the SQL to add the number of given minutes to a date.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDateSubMinutesExpression ($date, $minutes) : string

Returns the SQL to subtract the number of given minutes from a date.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDateAddHourExpression ($date, $hours) : string

Returns the SQL to add the number of given hours to a date.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDateSubHourExpression ($date, $hours) : string

Returns the SQL to subtract the number of given hours to a date.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDateAddDaysExpression ($date, $days) : string

Returns the SQL to add the number of given days to a date.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDateSubDaysExpression ($date, $days) : string

Returns the SQL to subtract the number of given days to a date.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDateAddWeeksExpression ($date, $weeks) : string

Returns the SQL to add the number of given weeks to a date.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDateSubWeeksExpression ($date, $weeks) : string

Returns the SQL to subtract the number of given weeks from a date.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDateAddMonthExpression ($date, $months) : string

Returns the SQL to add the number of given months to a date.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDateSubMonthExpression ($date, $months) : string

Returns the SQL to subtract the number of given months to a date.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDateAddQuartersExpression ($date, $quarters) : string

Returns the SQL to add the number of given quarters to a date.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDateSubQuartersExpression ($date, $quarters) : string

Returns the SQL to subtract the number of given quarters from a date.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDateAddYearsExpression ($date, $years) : string

Returns the SQL to add the number of given years to a date.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDateSubYearsExpression ($date, $years) : string

Returns the SQL to subtract the number of given years from a date.

method Doctrine\DBAL\Platforms\MySQL57Platform::getBitAndComparisonExpression ($value1, $value2) : string

Returns the SQL bit AND comparison expression.

method Doctrine\DBAL\Platforms\MySQL57Platform::getBitOrComparisonExpression ($value1, $value2) : string

Returns the SQL bit OR comparison expression.

method Doctrine\DBAL\Platforms\MySQL57Platform::getForUpdateSQL () : string

Returns the FOR UPDATE expression.

method Doctrine\DBAL\Platforms\MySQL57Platform::appendLockHint ($fromClause, $lockMode) : string

Honors that some SQL vendors such as MsSql use table hints for locking instead of the ANSI SQL FOR UPDATE specification.

method Doctrine\DBAL\Platforms\MySQL57Platform::getWriteLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which obtains an exclusive lock on the rows.

The semantics of this lock mode should equal the SELECT .. FOR UPDATE of the ANSI SQL standard.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDropTableSQL ($table) : string

Returns the SQL snippet to drop an existing table.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDropConstraintSQL ($constraint, $table) : string

Returns the SQL to drop a constraint.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDropForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to drop a foreign key.

method Doctrine\DBAL\Platforms\MySQL57Platform::getCreateTableSQL ($table, $createFlags = self::CREATE_INDEXES) : string[]

Returns the SQL statement(s) to create a table with the specified name, columns and constraints
on this platform.

method Doctrine\DBAL\Platforms\MySQL57Platform::getCommentOnTableSQL ($tableName, $comment) : string

method Doctrine\DBAL\Platforms\MySQL57Platform::getCommentOnColumnSQL ($tableName, $columnName, $comment) : string

method Doctrine\DBAL\Platforms\MySQL57Platform::getInlineColumnCommentSQL ($comment) : string

Returns the SQL to create inline comment on a column.

method Doctrine\DBAL\Platforms\MySQL57Platform::getCreateTemporaryTableSnippetSQL () : string

method Doctrine\DBAL\Platforms\MySQL57Platform::getCreateSequenceSQL ($sequence) : string

Returns the SQL to create a sequence on this platform.

method Doctrine\DBAL\Platforms\MySQL57Platform::getAlterSequenceSQL ($sequence) : string

Returns the SQL to change a sequence on this platform.

method Doctrine\DBAL\Platforms\MySQL57Platform::getCreateConstraintSQL ($constraint, $table) : string

Returns the SQL to create a constraint on a table on this platform.

method Doctrine\DBAL\Platforms\MySQL57Platform::getCreateIndexSQL ($index, $table) : string

Returns the SQL to create an index on a table on this platform.

method Doctrine\DBAL\Platforms\MySQL57Platform::getPartialIndexSQL ($index) : string

Adds condition for partial index.

method Doctrine\DBAL\Platforms\MySQL57Platform::getCreatePrimaryKeySQL ($index, $table) : string

Returns the SQL to create an unnamed primary key constraint.

method Doctrine\DBAL\Platforms\MySQL57Platform::getCreateSchemaSQL ($schemaName) : string

Returns the SQL to create a named schema.

method Doctrine\DBAL\Platforms\MySQL57Platform::quoteIdentifier ($str) : string

Quotes a string so that it can be safely used as a table or column name,
even if it is a reserved word of the platform. This also detects identifier
chains separated by dot and quotes them independently.

NOTE: Just because you CAN use quoted identifiers doesn't mean
you SHOULD use them. In general, they end up causing way more
problems than they solve.

method Doctrine\DBAL\Platforms\MySQL57Platform::quoteSingleIdentifier ($str) : string

Quotes a single identifier (no dot chain separation).

method Doctrine\DBAL\Platforms\MySQL57Platform::getCreateForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to create a new foreign key.

method Doctrine\DBAL\Platforms\MySQL57Platform::onSchemaAlterTableAddColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\MySQL57Platform::onSchemaAlterTableRemoveColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\MySQL57Platform::onSchemaAlterTableChangeColumn ($columnDiff, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\MySQL57Platform::onSchemaAlterTableRenameColumn ($oldColumnName, $column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\MySQL57Platform::onSchemaAlterTable ($diff, &$sql) : bool

method Doctrine\DBAL\Platforms\MySQL57Platform::_getAlterTableIndexForeignKeySQL ($diff) : string[]

Common code for alter table statement generation that updates the changed Index and Foreign Key definitions.

method Doctrine\DBAL\Platforms\MySQL57Platform::getColumnDeclarationListSQL ($fields) : string

Gets declaration of a number of fields in bulk.

method Doctrine\DBAL\Platforms\MySQL57Platform::getColumnDeclarationSQL ($name, $field) : string

Obtains DBMS specific SQL code portion needed to declare a generic type
field to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySQL57Platform::getCheckDeclarationSQL ($definition) : string

Obtains DBMS specific SQL code portion needed to set a CHECK constraint
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySQL57Platform::getUniqueConstraintDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set a unique
constraint declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySQL57Platform::getIndexDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySQL57Platform::getCustomTypeDeclarationSQL ($columnDef) : string

Obtains SQL code portion needed to create a custom column,
e.g. when a field has the "columnDefinition" keyword.
Only "AUTOINCREMENT" and "PRIMARY KEY" are added if appropriate.

method Doctrine\DBAL\Platforms\MySQL57Platform::getIndexFieldDeclarationListSQL ($columnsOrIndex) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySQL57Platform::getTemporaryTableSQL () : string

Returns the required SQL string that fits between CREATE ... TABLE
to create the table as a temporary table.

Should be overridden in driver classes to return the correct string for the
specific database type.

The default is to return the string "TEMPORARY" - this will result in a
SQL error for any database that does not support temporary tables, or that
requires a different SQL command from "CREATE TEMPORARY TABLE".

method Doctrine\DBAL\Platforms\MySQL57Platform::getTemporaryTableName ($tableName) : string

Some vendors require temporary table names to be qualified specially.

method Doctrine\DBAL\Platforms\MySQL57Platform::getForeignKeyDeclarationSQL ($foreignKey) : string

Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySQL57Platform::getForeignKeyReferentialActionSQL ($action) : string

Returns the given referential action in uppercase if valid, otherwise throws an exception.

method Doctrine\DBAL\Platforms\MySQL57Platform::getForeignKeyBaseDeclarationSQL ($foreignKey) : string

Obtains DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySQL57Platform::getUniqueFieldDeclarationSQL () : string

Obtains DBMS specific SQL code portion needed to set the UNIQUE constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySQL57Platform::prefersSequences () : bool

Whether the platform prefers sequences for ID generation.
Subclasses should override this method to return TRUE if they prefer sequences.

method Doctrine\DBAL\Platforms\MySQL57Platform::convertBooleans ($item) : mixed

Some platforms need the boolean values to be converted.

The default conversion in this implementation converts to integers (false => 0, true => 1).

Note: if the input is not a boolean the original input might be returned.

There are two contexts when converting booleans: Literals and Prepared Statements.
This method should handle the literal case

method Doctrine\DBAL\Platforms\MySQL57Platform::convertFromBoolean ($item) : boolnull

Some platforms have boolean literals that needs to be correctly converted

The default conversion tries to convert value into bool "(bool)$item"

method Doctrine\DBAL\Platforms\MySQL57Platform::convertBooleansToDatabaseValue ($item) : mixed

This method should handle the prepared statements case. When there is no
distinction, it's OK to use the same method.

Note: if the input is not a boolean the original input might be returned.

method Doctrine\DBAL\Platforms\MySQL57Platform::getCurrentDateSQL () : string

Returns the SQL specific for the platform to get the current date.

method Doctrine\DBAL\Platforms\MySQL57Platform::getCurrentTimeSQL () : string

Returns the SQL specific for the platform to get the current time.

method Doctrine\DBAL\Platforms\MySQL57Platform::getCurrentTimestampSQL () : string

Returns the SQL specific for the platform to get the current timestamp

method Doctrine\DBAL\Platforms\MySQL57Platform::_getTransactionIsolationLevelSQL ($level) : string

Returns the SQL for a given transaction isolation level Connection constant.

method Doctrine\DBAL\Platforms\MySQL57Platform::getListNamespacesSQL () : string

Returns the SQL statement for retrieving the namespaces defined in the database.

method Doctrine\DBAL\Platforms\MySQL57Platform::getListSequencesSQL ($database) : string

method Doctrine\DBAL\Platforms\MySQL57Platform::getListUsersSQL () : string

method Doctrine\DBAL\Platforms\MySQL57Platform::getDropSequenceSQL ($sequence) : string

Returns the SQL snippet to drop an existing sequence.

method Doctrine\DBAL\Platforms\MySQL57Platform::getSequenceNextValSQL ($sequenceName) : string

method Doctrine\DBAL\Platforms\MySQL57Platform::getDateTimeTzTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime with timezone offset fields.

method Doctrine\DBAL\Platforms\MySQL57Platform::supportsSequences () : bool

Whether the platform supports sequences.

method Doctrine\DBAL\Platforms\MySQL57Platform::usesSequenceEmulatedIdentityColumns () : bool

Whether the platform emulates identity columns through sequences.

Some platforms that do not support identity columns natively
but support sequences can emulate identity columns by using
sequences.

method Doctrine\DBAL\Platforms\MySQL57Platform::getIdentitySequenceName ($tableName, $columnName) : string

Returns the name of the sequence for a particular identity column in a particular table.

method Doctrine\DBAL\Platforms\MySQL57Platform::supportsIndexes () : bool

Whether the platform supports indexes.

method Doctrine\DBAL\Platforms\MySQL57Platform::supportsPartialIndexes () : bool

Whether the platform supports partial indexes.

method Doctrine\DBAL\Platforms\MySQL57Platform::supportsAlterTable () : bool

Whether the platform supports altering tables.

method Doctrine\DBAL\Platforms\MySQL57Platform::supportsTransactions () : bool

Whether the platform supports transactions.

method Doctrine\DBAL\Platforms\MySQL57Platform::supportsSavepoints () : bool

Whether the platform supports savepoints.

method Doctrine\DBAL\Platforms\MySQL57Platform::supportsReleaseSavepoints () : bool

Whether the platform supports releasing savepoints.

method Doctrine\DBAL\Platforms\MySQL57Platform::supportsPrimaryConstraints () : bool

Whether the platform supports primary key constraints.

method Doctrine\DBAL\Platforms\MySQL57Platform::supportsForeignKeyConstraints () : bool

Whether the platform supports foreign key constraints.

method Doctrine\DBAL\Platforms\MySQL57Platform::supportsForeignKeyOnUpdate () : bool

Whether this platform supports onUpdate in foreign key constraints.

method Doctrine\DBAL\Platforms\MySQL57Platform::supportsSchemas () : bool

Whether the platform supports database schemas.

method Doctrine\DBAL\Platforms\MySQL57Platform::canEmulateSchemas () : bool

Whether this platform can emulate schemas.

Platforms that either support or emulate schemas don't automatically
filter a schema for the namespaced elements in {@link
AbstractManager#createSchema}.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDefaultSchemaName () : string

Returns the default schema name.

method Doctrine\DBAL\Platforms\MySQL57Platform::supportsCreateDropDatabase () : bool

Whether this platform supports create database.

Some databases don't allow to create and drop databases at all or only with certain tools.

method Doctrine\DBAL\Platforms\MySQL57Platform::supportsGettingAffectedRows () : bool

Whether the platform supports getting the affected rows of a recent update/delete type query.

method Doctrine\DBAL\Platforms\MySQL57Platform::supportsCommentOnStatement () : bool

Whether this platform support the proprietary syntax "COMMENT ON asset".

method Doctrine\DBAL\Platforms\MySQL57Platform::hasNativeGuidType () : bool

Does this platform have native guid type.

method Doctrine\DBAL\Platforms\MySQL57Platform::getIdentityColumnNullInsertSQL () : void

method Doctrine\DBAL\Platforms\MySQL57Platform::supportsViews () : bool

Whether this platform supports views.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDateTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime value of this platform.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDateTimeTzFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime with timezone value of this platform.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDateFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored date value of this platform.

method Doctrine\DBAL\Platforms\MySQL57Platform::getTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored time value of this platform.

method Doctrine\DBAL\Platforms\MySQL57Platform::modifyLimitQuery ($query, $limit, $offset = null) : string

Adds an driver-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\MySQL57Platform::supportsLimitOffset () : bool

Whether the database platform support offsets in modify limit clauses.

method Doctrine\DBAL\Platforms\MySQL57Platform::getSQLResultCasing ($column) : string

Gets the character casing of a column in an SQL result set of this platform.

method Doctrine\DBAL\Platforms\MySQL57Platform::fixSchemaElementName ($schemaElementName) : string

Makes any fixes to a name of a schema element (table, sequence, ...) that are required
by restrictions of the platform, like a maximum length.

method Doctrine\DBAL\Platforms\MySQL57Platform::getMaxIdentifierLength () : int

Maximum length of any given database identifier, like tables or column names.

method Doctrine\DBAL\Platforms\MySQL57Platform::getEmptyIdentityInsertSQL ($tableName, $identifierColumnName) : string

Returns the insert SQL for an empty insert statement.

method Doctrine\DBAL\Platforms\MySQL57Platform::getTruncateTableSQL ($tableName, $cascade = false) : string

Generates a Truncate Table SQL statement for a given table.

Cascade is not supported on many platforms but would optionally cascade the truncate by
following the foreign keys.

method Doctrine\DBAL\Platforms\MySQL57Platform::getDummySelectSQL () : string

This is for test reasons, many vendors have special requirements for dummy statements.

method Doctrine\DBAL\Platforms\MySQL57Platform::createSavePoint ($savepoint) : string

Returns the SQL to create a new savepoint.

method Doctrine\DBAL\Platforms\MySQL57Platform::releaseSavePoint ($savepoint) : string

Returns the SQL to release a savepoint.

method Doctrine\DBAL\Platforms\MySQL57Platform::rollbackSavePoint ($savepoint) : string

Returns the SQL to rollback a savepoint.

method Doctrine\DBAL\Platforms\MySQL57Platform::getReservedKeywordsList () : Doctrine\DBAL\Platforms\Keywords\KeywordList

Returns the keyword list instance of this platform.

method Doctrine\DBAL\Platforms\MySQL57Platform::getStringLiteralQuoteCharacter () : string

Gets the character used for string literal quoting.

method Doctrine\DBAL\Platforms\MySQL57Platform::escapeStringForLike ($inputString, $escapeChar) : string

Escapes metacharacters in a string intended to be used with a LIKE
operator.

method Doctrine\DBAL\Platforms\MySQL57Platform::getLikeWildcardCharacters () : string

class Doctrine\DBAL\Platforms::MySQL80Platform

Provides the behavior, features and SQL dialect of the MySQL 8.0 (8.0 GA) database platform.

classconstant integer Doctrine\DBAL\Platforms\MySQL80Platform::LENGTH_LIMIT_TINYTEXT

classconstant integer Doctrine\DBAL\Platforms\MySQL80Platform::LENGTH_LIMIT_TEXT

classconstant integer Doctrine\DBAL\Platforms\MySQL80Platform::LENGTH_LIMIT_MEDIUMTEXT

classconstant integer Doctrine\DBAL\Platforms\MySQL80Platform::LENGTH_LIMIT_TINYBLOB

classconstant integer Doctrine\DBAL\Platforms\MySQL80Platform::LENGTH_LIMIT_BLOB

classconstant integer Doctrine\DBAL\Platforms\MySQL80Platform::LENGTH_LIMIT_MEDIUMBLOB

classconstant integer Doctrine\DBAL\Platforms\MySQL80Platform::CREATE_INDEXES

classconstant integer Doctrine\DBAL\Platforms\MySQL80Platform::CREATE_FOREIGNKEYS

classconstant string Doctrine\DBAL\Platforms\MySQL80Platform::DATE_INTERVAL_UNIT_SECOND

classconstant string Doctrine\DBAL\Platforms\MySQL80Platform::DATE_INTERVAL_UNIT_MINUTE

classconstant string Doctrine\DBAL\Platforms\MySQL80Platform::DATE_INTERVAL_UNIT_HOUR

classconstant string Doctrine\DBAL\Platforms\MySQL80Platform::DATE_INTERVAL_UNIT_DAY

classconstant string Doctrine\DBAL\Platforms\MySQL80Platform::DATE_INTERVAL_UNIT_WEEK

classconstant string Doctrine\DBAL\Platforms\MySQL80Platform::DATE_INTERVAL_UNIT_MONTH

classconstant string Doctrine\DBAL\Platforms\MySQL80Platform::DATE_INTERVAL_UNIT_QUARTER

classconstant string Doctrine\DBAL\Platforms\MySQL80Platform::DATE_INTERVAL_UNIT_YEAR

classconstant integer Doctrine\DBAL\Platforms\MySQL80Platform::TRIM_UNSPECIFIED

classconstant integer Doctrine\DBAL\Platforms\MySQL80Platform::TRIM_LEADING

classconstant integer Doctrine\DBAL\Platforms\MySQL80Platform::TRIM_TRAILING

classconstant integer Doctrine\DBAL\Platforms\MySQL80Platform::TRIM_BOTH

property string[]null Doctrine\DBAL\Platforms\MySQL80Platform::doctrineTypeMapping

property string[]null Doctrine\DBAL\Platforms\MySQL80Platform::doctrineTypeComments

Contains a list of all columns that should generate parseable column comments for type-detection
in reverse engineering scenarios.

property Doctrine\Common\EventManager Doctrine\DBAL\Platforms\MySQL80Platform::_eventManager

property Doctrine\DBAL\Platforms\Keywords\KeywordListnull Doctrine\DBAL\Platforms\MySQL80Platform::_keywords

Holds the KeywordList instance for the current platform.

method Doctrine\DBAL\Platforms\MySQL80Platform::getReservedKeywordsClass () : string

Returns the class name of the reserved keywords list.

method Doctrine\DBAL\Platforms\MySQL80Platform::hasNativeJsonType () : bool

Does this platform have native JSON type.

method Doctrine\DBAL\Platforms\MySQL80Platform::getJsonTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a JSON field.

By default this maps directly to a CLOB and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\MySQL80Platform::getPreAlterTableRenameIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\MySQL80Platform::getPostAlterTableRenameIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\MySQL80Platform::getRenameIndexSQL ($oldIndexName, $index, $tableName) : string[]

Returns the SQL for renaming an index on a table.

method Doctrine\DBAL\Platforms\MySQL80Platform::initializeDoctrineTypeMappings () : void

Lazy load Doctrine Type Mappings.

method Doctrine\DBAL\Platforms\MySQL80Platform::doModifyLimitQuery ($query, $limit, $offset) : string

Adds an platform-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\MySQL80Platform::getIdentifierQuoteCharacter () : string

Gets the character used for identifier quoting.

method Doctrine\DBAL\Platforms\MySQL80Platform::getRegexpExpression () : string

Returns the regular expression operator.

method Doctrine\DBAL\Platforms\MySQL80Platform::getGuidExpression () : string

Returns the global unique identifier expression.

method Doctrine\DBAL\Platforms\MySQL80Platform::getLocateExpression ($str, $substr, $startPos = false) : string

Returns the SQL snippet to get the position of the first occurrence of substring $substr in string $str.

method Doctrine\DBAL\Platforms\MySQL80Platform::getConcatExpression () : string

Returns a SQL snippet to concatenate the given expressions.

Accepts an arbitrary number of string parameters. Each parameter must contain an expression.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDateArithmeticIntervalExpression ($date, $operator, $interval, $unit) : string

Returns the SQL for a date arithmetic expression.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDateDiffExpression ($date1, $date2) : string

Returns the SQL to calculate the difference in days between the two passed dates.

Computes diff = date1 - date2.

method Doctrine\DBAL\Platforms\MySQL80Platform::getListDatabasesSQL () : string

method Doctrine\DBAL\Platforms\MySQL80Platform::getListTableConstraintsSQL ($table) : string

method Doctrine\DBAL\Platforms\MySQL80Platform::getListTableIndexesSQL ($table, $currentDatabase = null) : string

Returns the list of indexes for the current database.

The current database parameter is optional but will always be passed
when using the SchemaManager API and is the database the given table is in.

Attention: Some platforms only support currentDatabase when they
are connected with that database. Cross-database information schema
requests may be impossible.

Two approaches to listing the table indexes. The information_schema is
preferred, because it doesn't cause problems with SQL keywords such as "order" or "table".

method Doctrine\DBAL\Platforms\MySQL80Platform::getListViewsSQL ($database) : string

Returns the SQL to list all views of a database or user.

method Doctrine\DBAL\Platforms\MySQL80Platform::getListTableForeignKeysSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\MySQL80Platform::getCreateViewSQL ($name, $sql) : string

method Doctrine\DBAL\Platforms\MySQL80Platform::getDropViewSQL ($name) : string

method Doctrine\DBAL\Platforms\MySQL80Platform::getVarcharTypeDeclarationSQLSnippet ($length, $fixed) : string

method Doctrine\DBAL\Platforms\MySQL80Platform::getBinaryTypeDeclarationSQLSnippet ($length, $fixed) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\MySQL80Platform::getClobTypeDeclarationSQL ($field) : string

Gets the SQL snippet used to declare a CLOB column type.

TINYTEXT   : 2 ^  8 - 1 = 255
TEXT       : 2 ^ 16 - 1 = 65535
MEDIUMTEXT : 2 ^ 24 - 1 = 16777215
LONGTEXT   : 2 ^ 32 - 1 = 4294967295

Returns the SQL snippet used to declare a CLOB column type.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDateTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime fields in
statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDateTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create date fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySQL80Platform::getTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create time fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySQL80Platform::getBooleanTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a boolean column.

method Doctrine\DBAL\Platforms\MySQL80Platform::getCollationFieldDeclaration ($collation) : string

Obtain DBMS specific SQL code portion needed to set the COLLATION
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySQL80Platform::prefersIdentityColumns () : bool

Whether the platform prefers identity columns (eg. autoincrement) for ID generation.
Subclasses should override this method to return TRUE if they prefer identity columns.

MySql prefers "autoincrement" identity columns since sequences can only
be emulated with a table.

method Doctrine\DBAL\Platforms\MySQL80Platform::supportsIdentityColumns () : bool

Whether the platform supports identity columns.

Identity columns are columns that receive an auto-generated value from the
database on insert of a row.

MySql supports this through AUTO_INCREMENT columns.

method Doctrine\DBAL\Platforms\MySQL80Platform::supportsInlineColumnComments () : bool

Whether this platform support to add inline column comments as postfix.

method Doctrine\DBAL\Platforms\MySQL80Platform::supportsColumnCollation () : bool

Does this platform support column collation?

method Doctrine\DBAL\Platforms\MySQL80Platform::getListTablesSQL () : string

method Doctrine\DBAL\Platforms\MySQL80Platform::getListTableColumnsSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\MySQL80Platform::getListTableMetadataSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\MySQL80Platform::getCreateDatabaseSQL ($name) : string

Returns the SQL to create a new database.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDropDatabaseSQL ($name) : string

Returns the SQL snippet to drop an existing database.

method Doctrine\DBAL\Platforms\MySQL80Platform::_getCreateTableSQL ($tableName, $columns, $options = []) : string[]

Returns the SQL used to create a table.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDefaultValueDeclarationSQL ($field) : string

Obtains DBMS specific SQL code portion needed to set a default value
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySQL80Platform::getAlterTableSQL ($diff) : string[]

Gets the SQL statements for altering an existing table.

This method returns an array of SQL statements, since some platforms need several statements.

method Doctrine\DBAL\Platforms\MySQL80Platform::getPreAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\MySQL80Platform::getPostAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\MySQL80Platform::getCreateIndexSQLFlags ($index) : string

Adds additional flags for index generation.

method Doctrine\DBAL\Platforms\MySQL80Platform::getIntegerTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a 4 byte integer column.

method Doctrine\DBAL\Platforms\MySQL80Platform::getBigIntTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares an 8 byte integer column.

method Doctrine\DBAL\Platforms\MySQL80Platform::getSmallIntTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a 2 byte integer column.

method Doctrine\DBAL\Platforms\MySQL80Platform::getFloatDeclarationSQL ($field) : string

method Doctrine\DBAL\Platforms\MySQL80Platform::getDecimalTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a floating point column of arbitrary precision.

method Doctrine\DBAL\Platforms\MySQL80Platform::_getCommonIntegerTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares common properties of an integer column.

method Doctrine\DBAL\Platforms\MySQL80Platform::getColumnCharsetDeclarationSQL ($charset) : string

Obtains DBMS specific SQL code portion needed to set the CHARACTER SET
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySQL80Platform::getColumnCollationDeclarationSQL ($collation) : string

Obtains DBMS specific SQL code portion needed to set the COLLATION
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySQL80Platform::getAdvancedForeignKeyOptionsSQL ($foreignKey) : string

Returns the FOREIGN KEY query section dealing with non-standard options
as MATCH, INITIALLY DEFERRED, ON UPDATE, ...

method Doctrine\DBAL\Platforms\MySQL80Platform::getDropIndexSQL ($index, $table = null) : string

Returns the SQL to drop an index from a table.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDropPrimaryKeySQL ($table) : string

method Doctrine\DBAL\Platforms\MySQL80Platform::getSetTransactionIsolationSQL ($level) : string

Returns the SQL to set the transaction isolation level.

method Doctrine\DBAL\Platforms\MySQL80Platform::getName () : string

Gets the name of the platform.

method Doctrine\DBAL\Platforms\MySQL80Platform::getReadLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which locks rows in shared read lock.

This defaults to the ANSI SQL "FOR UPDATE", which is an exclusive lock (Write). Some database
vendors allow to lighten this constraint up to be a real read lock.

method Doctrine\DBAL\Platforms\MySQL80Platform::getVarcharMaxLength () : int

Gets the maximum length of a varchar field.

method Doctrine\DBAL\Platforms\MySQL80Platform::getBinaryMaxLength () : int

Gets the maximum length of a binary field.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDropTemporaryTableSQL ($table) : string

Returns the SQL to safely drop a temporary table WITHOUT implicitly committing an open transaction.

MySQL commits a transaction implicitly when DROP TABLE is executed, however not
if DROP TEMPORARY TABLE is executed.

method Doctrine\DBAL\Platforms\MySQL80Platform::getBlobTypeDeclarationSQL ($field) : string

Gets the SQL Snippet used to declare a BLOB column type.

TINYBLOB   : 2 ^  8 - 1 = 255
BLOB       : 2 ^ 16 - 1 = 65535
MEDIUMBLOB : 2 ^ 24 - 1 = 16777215
LONGBLOB   : 2 ^ 32 - 1 = 4294967295

Returns the SQL Snippet used to declare a BLOB column type.

method Doctrine\DBAL\Platforms\MySQL80Platform::quoteStringLiteral ($str) : string

Quotes a literal string.
This method is NOT meant to fix SQL injections!
It is only meant to escape this platform's string literal
quote character inside the given literal string.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDefaultTransactionIsolationLevel () : int

Gets the default transaction isolation level of the platform.

method Doctrine\DBAL\Platforms\MySQL80Platform::supportsColumnLengthIndexes () : bool

Whether the platform supports indexes with column length definitions.

method Doctrine\DBAL\Platforms\MySQL80Platform::__construct () : void

method Doctrine\DBAL\Platforms\MySQL80Platform::setEventManager ($eventManager) : void

Sets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\MySQL80Platform::getEventManager () : Doctrine\Common\EventManager

Gets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\MySQL80Platform::getVarcharTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a VARCHAR column type.

method Doctrine\DBAL\Platforms\MySQL80Platform::getBinaryTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\MySQL80Platform::getGuidTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a GUID/UUID field.

By default this maps directly to a CHAR(36) and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\MySQL80Platform::registerDoctrineTypeMapping ($dbType, $doctrineType) : void

Registers a doctrine type to be used in conjunction with a column type of this platform.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDoctrineTypeMapping ($dbType) : string

Gets the Doctrine type that is mapped for the given database column type.

method Doctrine\DBAL\Platforms\MySQL80Platform::hasDoctrineTypeMappingFor ($dbType) : bool

Checks if a database type is currently supported by this platform.

method Doctrine\DBAL\Platforms\MySQL80Platform::initializeCommentedDoctrineTypes () : void

Initializes the Doctrine Type comments instance variable for in_array() checks.

method Doctrine\DBAL\Platforms\MySQL80Platform::isCommentedDoctrineType ($doctrineType) : bool

Is it necessary for the platform to add a parsable type comment to allow reverse engineering the given type?

method Doctrine\DBAL\Platforms\MySQL80Platform::markDoctrineTypeCommented ($doctrineType) : void

Marks this type as to be commented in ALTER TABLE and CREATE TABLE statements.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDoctrineTypeComment ($doctrineType) : string

Gets the comment to append to a column comment that helps parsing this type in reverse engineering.

method Doctrine\DBAL\Platforms\MySQL80Platform::getColumnComment ($column) : stringnull

Gets the comment of a passed column modified by potential doctrine type comment hints.

method Doctrine\DBAL\Platforms\MySQL80Platform::getSqlCommentStartString () : string

Gets the string portion that starts an SQL comment.

method Doctrine\DBAL\Platforms\MySQL80Platform::getSqlCommentEndString () : string

Gets the string portion that ends an SQL comment.

method Doctrine\DBAL\Platforms\MySQL80Platform::getCharMaxLength () : int

Gets the maximum length of a char field.

method Doctrine\DBAL\Platforms\MySQL80Platform::getVarcharDefaultLength () : int

Gets the default length of a varchar field.

method Doctrine\DBAL\Platforms\MySQL80Platform::getBinaryDefaultLength () : int

Gets the default length of a binary field.

method Doctrine\DBAL\Platforms\MySQL80Platform::getWildcards () : string[]

Gets all SQL wildcard characters of the platform.

method Doctrine\DBAL\Platforms\MySQL80Platform::getAvgExpression ($column) : string

Returns the SQL snippet to get the average value of a column.

method Doctrine\DBAL\Platforms\MySQL80Platform::getCountExpression ($column) : string

Returns the SQL snippet to get the number of rows (without a NULL value) of a column.

If a '*' is used instead of a column the number of selected rows is returned.

method Doctrine\DBAL\Platforms\MySQL80Platform::getMaxExpression ($column) : string

Returns the SQL snippet to get the highest value of a column.

method Doctrine\DBAL\Platforms\MySQL80Platform::getMinExpression ($column) : string

Returns the SQL snippet to get the lowest value of a column.

method Doctrine\DBAL\Platforms\MySQL80Platform::getSumExpression ($column) : string

Returns the SQL snippet to get the total sum of a column.

method Doctrine\DBAL\Platforms\MySQL80Platform::getMd5Expression ($column) : string

Returns the SQL snippet to get the md5 sum of a field.

Note: Not SQL92, but common functionality.

method Doctrine\DBAL\Platforms\MySQL80Platform::getLengthExpression ($column) : string

Returns the SQL snippet to get the length of a text field.

method Doctrine\DBAL\Platforms\MySQL80Platform::getSqrtExpression ($column) : string

Returns the SQL snippet to get the squared value of a column.

method Doctrine\DBAL\Platforms\MySQL80Platform::getRoundExpression ($column, $decimals = 0) : string

Returns the SQL snippet to round a numeric field to the number of decimals specified.

method Doctrine\DBAL\Platforms\MySQL80Platform::getModExpression ($expression1, $expression2) : string

Returns the SQL snippet to get the remainder of the division operation $expression1 / $expression2.

method Doctrine\DBAL\Platforms\MySQL80Platform::getTrimExpression ($str, $mode = Doctrine\DBAL\Platforms\TrimMode::UNSPECIFIED, $char = false) : string

Returns the SQL snippet to trim a string.

method Doctrine\DBAL\Platforms\MySQL80Platform::getRtrimExpression ($str) : string

Returns the SQL snippet to trim trailing space characters from the expression.

method Doctrine\DBAL\Platforms\MySQL80Platform::getLtrimExpression ($str) : string

Returns the SQL snippet to trim leading space characters from the expression.

method Doctrine\DBAL\Platforms\MySQL80Platform::getUpperExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to uppercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\MySQL80Platform::getLowerExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to lowercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\MySQL80Platform::getNowExpression () : string

Returns the SQL snippet to get the current system date.

method Doctrine\DBAL\Platforms\MySQL80Platform::getSubstringExpression ($value, $from, $length = null) : string

Returns a SQL snippet to get a substring inside an SQL statement.

Note: Not SQL92, but common functionality.

SQLite only supports the 2 parameter variant of this function.

method Doctrine\DBAL\Platforms\MySQL80Platform::getNotExpression ($expression) : string

Returns the SQL for a logical not.

Example:

$q = new Doctrine_Query();
$e = $q->expr;
$q->select('*')->from('table')
->where($e->eq('id', $e->not('null'));

method Doctrine\DBAL\Platforms\MySQL80Platform::getIsNullExpression ($expression) : string

Returns the SQL that checks if an expression is null.

method Doctrine\DBAL\Platforms\MySQL80Platform::getIsNotNullExpression ($expression) : string

Returns the SQL that checks if an expression is not null.

method Doctrine\DBAL\Platforms\MySQL80Platform::getBetweenExpression ($expression, $value1, $value2) : string

Returns the SQL that checks if an expression evaluates to a value between two values.

The parameter $expression is checked if it is between $value1 and $value2.

Note: There is a slight difference in the way BETWEEN works on some databases.
http://www.w3schools.com/sql/sql_between.asp. If you want complete database
independence you should avoid using between().

method Doctrine\DBAL\Platforms\MySQL80Platform::getAcosExpression ($value) : string

Returns the SQL to get the arccosine of a value.

method Doctrine\DBAL\Platforms\MySQL80Platform::getSinExpression ($value) : string

Returns the SQL to get the sine of a value.

method Doctrine\DBAL\Platforms\MySQL80Platform::getPiExpression () : string

Returns the SQL to get the PI value.

method Doctrine\DBAL\Platforms\MySQL80Platform::getCosExpression ($value) : string

Returns the SQL to get the cosine of a value.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDateAddSecondsExpression ($date, $seconds) : string

Returns the SQL to add the number of given seconds to a date.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDateSubSecondsExpression ($date, $seconds) : string

Returns the SQL to subtract the number of given seconds from a date.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDateAddMinutesExpression ($date, $minutes) : string

Returns the SQL to add the number of given minutes to a date.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDateSubMinutesExpression ($date, $minutes) : string

Returns the SQL to subtract the number of given minutes from a date.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDateAddHourExpression ($date, $hours) : string

Returns the SQL to add the number of given hours to a date.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDateSubHourExpression ($date, $hours) : string

Returns the SQL to subtract the number of given hours to a date.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDateAddDaysExpression ($date, $days) : string

Returns the SQL to add the number of given days to a date.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDateSubDaysExpression ($date, $days) : string

Returns the SQL to subtract the number of given days to a date.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDateAddWeeksExpression ($date, $weeks) : string

Returns the SQL to add the number of given weeks to a date.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDateSubWeeksExpression ($date, $weeks) : string

Returns the SQL to subtract the number of given weeks from a date.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDateAddMonthExpression ($date, $months) : string

Returns the SQL to add the number of given months to a date.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDateSubMonthExpression ($date, $months) : string

Returns the SQL to subtract the number of given months to a date.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDateAddQuartersExpression ($date, $quarters) : string

Returns the SQL to add the number of given quarters to a date.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDateSubQuartersExpression ($date, $quarters) : string

Returns the SQL to subtract the number of given quarters from a date.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDateAddYearsExpression ($date, $years) : string

Returns the SQL to add the number of given years to a date.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDateSubYearsExpression ($date, $years) : string

Returns the SQL to subtract the number of given years from a date.

method Doctrine\DBAL\Platforms\MySQL80Platform::getBitAndComparisonExpression ($value1, $value2) : string

Returns the SQL bit AND comparison expression.

method Doctrine\DBAL\Platforms\MySQL80Platform::getBitOrComparisonExpression ($value1, $value2) : string

Returns the SQL bit OR comparison expression.

method Doctrine\DBAL\Platforms\MySQL80Platform::getForUpdateSQL () : string

Returns the FOR UPDATE expression.

method Doctrine\DBAL\Platforms\MySQL80Platform::appendLockHint ($fromClause, $lockMode) : string

Honors that some SQL vendors such as MsSql use table hints for locking instead of the ANSI SQL FOR UPDATE specification.

method Doctrine\DBAL\Platforms\MySQL80Platform::getWriteLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which obtains an exclusive lock on the rows.

The semantics of this lock mode should equal the SELECT .. FOR UPDATE of the ANSI SQL standard.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDropTableSQL ($table) : string

Returns the SQL snippet to drop an existing table.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDropConstraintSQL ($constraint, $table) : string

Returns the SQL to drop a constraint.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDropForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to drop a foreign key.

method Doctrine\DBAL\Platforms\MySQL80Platform::getCreateTableSQL ($table, $createFlags = self::CREATE_INDEXES) : string[]

Returns the SQL statement(s) to create a table with the specified name, columns and constraints
on this platform.

method Doctrine\DBAL\Platforms\MySQL80Platform::getCommentOnTableSQL ($tableName, $comment) : string

method Doctrine\DBAL\Platforms\MySQL80Platform::getCommentOnColumnSQL ($tableName, $columnName, $comment) : string

method Doctrine\DBAL\Platforms\MySQL80Platform::getInlineColumnCommentSQL ($comment) : string

Returns the SQL to create inline comment on a column.

method Doctrine\DBAL\Platforms\MySQL80Platform::getCreateTemporaryTableSnippetSQL () : string

method Doctrine\DBAL\Platforms\MySQL80Platform::getCreateSequenceSQL ($sequence) : string

Returns the SQL to create a sequence on this platform.

method Doctrine\DBAL\Platforms\MySQL80Platform::getAlterSequenceSQL ($sequence) : string

Returns the SQL to change a sequence on this platform.

method Doctrine\DBAL\Platforms\MySQL80Platform::getCreateConstraintSQL ($constraint, $table) : string

Returns the SQL to create a constraint on a table on this platform.

method Doctrine\DBAL\Platforms\MySQL80Platform::getCreateIndexSQL ($index, $table) : string

Returns the SQL to create an index on a table on this platform.

method Doctrine\DBAL\Platforms\MySQL80Platform::getPartialIndexSQL ($index) : string

Adds condition for partial index.

method Doctrine\DBAL\Platforms\MySQL80Platform::getCreatePrimaryKeySQL ($index, $table) : string

Returns the SQL to create an unnamed primary key constraint.

method Doctrine\DBAL\Platforms\MySQL80Platform::getCreateSchemaSQL ($schemaName) : string

Returns the SQL to create a named schema.

method Doctrine\DBAL\Platforms\MySQL80Platform::quoteIdentifier ($str) : string

Quotes a string so that it can be safely used as a table or column name,
even if it is a reserved word of the platform. This also detects identifier
chains separated by dot and quotes them independently.

NOTE: Just because you CAN use quoted identifiers doesn't mean
you SHOULD use them. In general, they end up causing way more
problems than they solve.

method Doctrine\DBAL\Platforms\MySQL80Platform::quoteSingleIdentifier ($str) : string

Quotes a single identifier (no dot chain separation).

method Doctrine\DBAL\Platforms\MySQL80Platform::getCreateForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to create a new foreign key.

method Doctrine\DBAL\Platforms\MySQL80Platform::onSchemaAlterTableAddColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\MySQL80Platform::onSchemaAlterTableRemoveColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\MySQL80Platform::onSchemaAlterTableChangeColumn ($columnDiff, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\MySQL80Platform::onSchemaAlterTableRenameColumn ($oldColumnName, $column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\MySQL80Platform::onSchemaAlterTable ($diff, &$sql) : bool

method Doctrine\DBAL\Platforms\MySQL80Platform::_getAlterTableIndexForeignKeySQL ($diff) : string[]

Common code for alter table statement generation that updates the changed Index and Foreign Key definitions.

method Doctrine\DBAL\Platforms\MySQL80Platform::getColumnDeclarationListSQL ($fields) : string

Gets declaration of a number of fields in bulk.

method Doctrine\DBAL\Platforms\MySQL80Platform::getColumnDeclarationSQL ($name, $field) : string

Obtains DBMS specific SQL code portion needed to declare a generic type
field to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySQL80Platform::getCheckDeclarationSQL ($definition) : string

Obtains DBMS specific SQL code portion needed to set a CHECK constraint
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySQL80Platform::getUniqueConstraintDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set a unique
constraint declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySQL80Platform::getIndexDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySQL80Platform::getCustomTypeDeclarationSQL ($columnDef) : string

Obtains SQL code portion needed to create a custom column,
e.g. when a field has the "columnDefinition" keyword.
Only "AUTOINCREMENT" and "PRIMARY KEY" are added if appropriate.

method Doctrine\DBAL\Platforms\MySQL80Platform::getIndexFieldDeclarationListSQL ($columnsOrIndex) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySQL80Platform::getTemporaryTableSQL () : string

Returns the required SQL string that fits between CREATE ... TABLE
to create the table as a temporary table.

Should be overridden in driver classes to return the correct string for the
specific database type.

The default is to return the string "TEMPORARY" - this will result in a
SQL error for any database that does not support temporary tables, or that
requires a different SQL command from "CREATE TEMPORARY TABLE".

method Doctrine\DBAL\Platforms\MySQL80Platform::getTemporaryTableName ($tableName) : string

Some vendors require temporary table names to be qualified specially.

method Doctrine\DBAL\Platforms\MySQL80Platform::getForeignKeyDeclarationSQL ($foreignKey) : string

Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySQL80Platform::getForeignKeyReferentialActionSQL ($action) : string

Returns the given referential action in uppercase if valid, otherwise throws an exception.

method Doctrine\DBAL\Platforms\MySQL80Platform::getForeignKeyBaseDeclarationSQL ($foreignKey) : string

Obtains DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySQL80Platform::getUniqueFieldDeclarationSQL () : string

Obtains DBMS specific SQL code portion needed to set the UNIQUE constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\MySQL80Platform::prefersSequences () : bool

Whether the platform prefers sequences for ID generation.
Subclasses should override this method to return TRUE if they prefer sequences.

method Doctrine\DBAL\Platforms\MySQL80Platform::convertBooleans ($item) : mixed

Some platforms need the boolean values to be converted.

The default conversion in this implementation converts to integers (false => 0, true => 1).

Note: if the input is not a boolean the original input might be returned.

There are two contexts when converting booleans: Literals and Prepared Statements.
This method should handle the literal case

method Doctrine\DBAL\Platforms\MySQL80Platform::convertFromBoolean ($item) : boolnull

Some platforms have boolean literals that needs to be correctly converted

The default conversion tries to convert value into bool "(bool)$item"

method Doctrine\DBAL\Platforms\MySQL80Platform::convertBooleansToDatabaseValue ($item) : mixed

This method should handle the prepared statements case. When there is no
distinction, it's OK to use the same method.

Note: if the input is not a boolean the original input might be returned.

method Doctrine\DBAL\Platforms\MySQL80Platform::getCurrentDateSQL () : string

Returns the SQL specific for the platform to get the current date.

method Doctrine\DBAL\Platforms\MySQL80Platform::getCurrentTimeSQL () : string

Returns the SQL specific for the platform to get the current time.

method Doctrine\DBAL\Platforms\MySQL80Platform::getCurrentTimestampSQL () : string

Returns the SQL specific for the platform to get the current timestamp

method Doctrine\DBAL\Platforms\MySQL80Platform::_getTransactionIsolationLevelSQL ($level) : string

Returns the SQL for a given transaction isolation level Connection constant.

method Doctrine\DBAL\Platforms\MySQL80Platform::getListNamespacesSQL () : string

Returns the SQL statement for retrieving the namespaces defined in the database.

method Doctrine\DBAL\Platforms\MySQL80Platform::getListSequencesSQL ($database) : string

method Doctrine\DBAL\Platforms\MySQL80Platform::getListUsersSQL () : string

method Doctrine\DBAL\Platforms\MySQL80Platform::getDropSequenceSQL ($sequence) : string

Returns the SQL snippet to drop an existing sequence.

method Doctrine\DBAL\Platforms\MySQL80Platform::getSequenceNextValSQL ($sequenceName) : string

method Doctrine\DBAL\Platforms\MySQL80Platform::getDateTimeTzTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime with timezone offset fields.

method Doctrine\DBAL\Platforms\MySQL80Platform::supportsSequences () : bool

Whether the platform supports sequences.

method Doctrine\DBAL\Platforms\MySQL80Platform::usesSequenceEmulatedIdentityColumns () : bool

Whether the platform emulates identity columns through sequences.

Some platforms that do not support identity columns natively
but support sequences can emulate identity columns by using
sequences.

method Doctrine\DBAL\Platforms\MySQL80Platform::getIdentitySequenceName ($tableName, $columnName) : string

Returns the name of the sequence for a particular identity column in a particular table.

method Doctrine\DBAL\Platforms\MySQL80Platform::supportsIndexes () : bool

Whether the platform supports indexes.

method Doctrine\DBAL\Platforms\MySQL80Platform::supportsPartialIndexes () : bool

Whether the platform supports partial indexes.

method Doctrine\DBAL\Platforms\MySQL80Platform::supportsAlterTable () : bool

Whether the platform supports altering tables.

method Doctrine\DBAL\Platforms\MySQL80Platform::supportsTransactions () : bool

Whether the platform supports transactions.

method Doctrine\DBAL\Platforms\MySQL80Platform::supportsSavepoints () : bool

Whether the platform supports savepoints.

method Doctrine\DBAL\Platforms\MySQL80Platform::supportsReleaseSavepoints () : bool

Whether the platform supports releasing savepoints.

method Doctrine\DBAL\Platforms\MySQL80Platform::supportsPrimaryConstraints () : bool

Whether the platform supports primary key constraints.

method Doctrine\DBAL\Platforms\MySQL80Platform::supportsForeignKeyConstraints () : bool

Whether the platform supports foreign key constraints.

method Doctrine\DBAL\Platforms\MySQL80Platform::supportsForeignKeyOnUpdate () : bool

Whether this platform supports onUpdate in foreign key constraints.

method Doctrine\DBAL\Platforms\MySQL80Platform::supportsSchemas () : bool

Whether the platform supports database schemas.

method Doctrine\DBAL\Platforms\MySQL80Platform::canEmulateSchemas () : bool

Whether this platform can emulate schemas.

Platforms that either support or emulate schemas don't automatically
filter a schema for the namespaced elements in {@link
AbstractManager#createSchema}.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDefaultSchemaName () : string

Returns the default schema name.

method Doctrine\DBAL\Platforms\MySQL80Platform::supportsCreateDropDatabase () : bool

Whether this platform supports create database.

Some databases don't allow to create and drop databases at all or only with certain tools.

method Doctrine\DBAL\Platforms\MySQL80Platform::supportsGettingAffectedRows () : bool

Whether the platform supports getting the affected rows of a recent update/delete type query.

method Doctrine\DBAL\Platforms\MySQL80Platform::supportsCommentOnStatement () : bool

Whether this platform support the proprietary syntax "COMMENT ON asset".

method Doctrine\DBAL\Platforms\MySQL80Platform::hasNativeGuidType () : bool

Does this platform have native guid type.

method Doctrine\DBAL\Platforms\MySQL80Platform::getIdentityColumnNullInsertSQL () : void

method Doctrine\DBAL\Platforms\MySQL80Platform::supportsViews () : bool

Whether this platform supports views.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDateTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime value of this platform.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDateTimeTzFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime with timezone value of this platform.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDateFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored date value of this platform.

method Doctrine\DBAL\Platforms\MySQL80Platform::getTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored time value of this platform.

method Doctrine\DBAL\Platforms\MySQL80Platform::modifyLimitQuery ($query, $limit, $offset = null) : string

Adds an driver-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\MySQL80Platform::supportsLimitOffset () : bool

Whether the database platform support offsets in modify limit clauses.

method Doctrine\DBAL\Platforms\MySQL80Platform::getSQLResultCasing ($column) : string

Gets the character casing of a column in an SQL result set of this platform.

method Doctrine\DBAL\Platforms\MySQL80Platform::fixSchemaElementName ($schemaElementName) : string

Makes any fixes to a name of a schema element (table, sequence, ...) that are required
by restrictions of the platform, like a maximum length.

method Doctrine\DBAL\Platforms\MySQL80Platform::getMaxIdentifierLength () : int

Maximum length of any given database identifier, like tables or column names.

method Doctrine\DBAL\Platforms\MySQL80Platform::getEmptyIdentityInsertSQL ($tableName, $identifierColumnName) : string

Returns the insert SQL for an empty insert statement.

method Doctrine\DBAL\Platforms\MySQL80Platform::getTruncateTableSQL ($tableName, $cascade = false) : string

Generates a Truncate Table SQL statement for a given table.

Cascade is not supported on many platforms but would optionally cascade the truncate by
following the foreign keys.

method Doctrine\DBAL\Platforms\MySQL80Platform::getDummySelectSQL () : string

This is for test reasons, many vendors have special requirements for dummy statements.

method Doctrine\DBAL\Platforms\MySQL80Platform::createSavePoint ($savepoint) : string

Returns the SQL to create a new savepoint.

method Doctrine\DBAL\Platforms\MySQL80Platform::releaseSavePoint ($savepoint) : string

Returns the SQL to release a savepoint.

method Doctrine\DBAL\Platforms\MySQL80Platform::rollbackSavePoint ($savepoint) : string

Returns the SQL to rollback a savepoint.

method Doctrine\DBAL\Platforms\MySQL80Platform::getReservedKeywordsList () : Doctrine\DBAL\Platforms\Keywords\KeywordList

Returns the keyword list instance of this platform.

method Doctrine\DBAL\Platforms\MySQL80Platform::getStringLiteralQuoteCharacter () : string

Gets the character used for string literal quoting.

method Doctrine\DBAL\Platforms\MySQL80Platform::escapeStringForLike ($inputString, $escapeChar) : string

Escapes metacharacters in a string intended to be used with a LIKE
operator.

method Doctrine\DBAL\Platforms\MySQL80Platform::getLikeWildcardCharacters () : string

class Doctrine\DBAL\Platforms::OraclePlatform

OraclePlatform.

classconstant integer Doctrine\DBAL\Platforms\OraclePlatform::CREATE_INDEXES

classconstant integer Doctrine\DBAL\Platforms\OraclePlatform::CREATE_FOREIGNKEYS

classconstant string Doctrine\DBAL\Platforms\OraclePlatform::DATE_INTERVAL_UNIT_SECOND

classconstant string Doctrine\DBAL\Platforms\OraclePlatform::DATE_INTERVAL_UNIT_MINUTE

classconstant string Doctrine\DBAL\Platforms\OraclePlatform::DATE_INTERVAL_UNIT_HOUR

classconstant string Doctrine\DBAL\Platforms\OraclePlatform::DATE_INTERVAL_UNIT_DAY

classconstant string Doctrine\DBAL\Platforms\OraclePlatform::DATE_INTERVAL_UNIT_WEEK

classconstant string Doctrine\DBAL\Platforms\OraclePlatform::DATE_INTERVAL_UNIT_MONTH

classconstant string Doctrine\DBAL\Platforms\OraclePlatform::DATE_INTERVAL_UNIT_QUARTER

classconstant string Doctrine\DBAL\Platforms\OraclePlatform::DATE_INTERVAL_UNIT_YEAR

classconstant integer Doctrine\DBAL\Platforms\OraclePlatform::TRIM_UNSPECIFIED

classconstant integer Doctrine\DBAL\Platforms\OraclePlatform::TRIM_LEADING

classconstant integer Doctrine\DBAL\Platforms\OraclePlatform::TRIM_TRAILING

classconstant integer Doctrine\DBAL\Platforms\OraclePlatform::TRIM_BOTH

property string[]null Doctrine\DBAL\Platforms\OraclePlatform::doctrineTypeMapping

property string[]null Doctrine\DBAL\Platforms\OraclePlatform::doctrineTypeComments

Contains a list of all columns that should generate parseable column comments for type-detection
in reverse engineering scenarios.

property Doctrine\Common\EventManager Doctrine\DBAL\Platforms\OraclePlatform::_eventManager

property Doctrine\DBAL\Platforms\Keywords\KeywordListnull Doctrine\DBAL\Platforms\OraclePlatform::_keywords

Holds the KeywordList instance for the current platform.

method Doctrine\DBAL\Platforms\OraclePlatform::assertValidIdentifier ($identifier) : void

Assertion for Oracle identifiers.

method Doctrine\DBAL\Platforms\OraclePlatform::getSubstringExpression ($value, $position, $length = null) : string

Returns a SQL snippet to get a substring inside an SQL statement.

Note: Not SQL92, but common functionality.

SQLite only supports the 2 parameter variant of this function.

method Doctrine\DBAL\Platforms\OraclePlatform::getNowExpression ($type = "timestamp") : string

Returns the SQL snippet to get the current system date.

method Doctrine\DBAL\Platforms\OraclePlatform::getLocateExpression ($str, $substr, $startPos = false) : string

Returns the SQL snippet to get the position of the first occurrence of substring $substr in string $str.

method Doctrine\DBAL\Platforms\OraclePlatform::getGuidExpression () : string

Returns the global unique identifier expression.

method Doctrine\DBAL\Platforms\OraclePlatform::getDateArithmeticIntervalExpression ($date, $operator, $interval, $unit) : string

Returns the SQL for a date arithmetic expression.

method Doctrine\DBAL\Platforms\OraclePlatform::getDateDiffExpression ($date1, $date2) : string

Returns the SQL to calculate the difference in days between the two passed dates.

Computes diff = date1 - date2.

method Doctrine\DBAL\Platforms\OraclePlatform::getBitAndComparisonExpression ($value1, $value2) : string

Returns the SQL bit AND comparison expression.

method Doctrine\DBAL\Platforms\OraclePlatform::getBitOrComparisonExpression ($value1, $value2) : string

Returns the SQL bit OR comparison expression.

method Doctrine\DBAL\Platforms\OraclePlatform::getCreateSequenceSQL ($sequence) : string

Returns the SQL to create a sequence on this platform.

Need to specifiy minvalue, since start with is hidden in the system and MINVALUE <= START WITH.
Therefore we can use MINVALUE to be able to get a hint what START WITH was for later introspection
in Doctrine\DBAL\Platforms\OraclePlatform::listSequences()

method Doctrine\DBAL\Platforms\OraclePlatform::getAlterSequenceSQL ($sequence) : string

Returns the SQL to change a sequence on this platform.

method Doctrine\DBAL\Platforms\OraclePlatform::getSequenceNextValSQL ($sequenceName) : string

method Doctrine\DBAL\Platforms\OraclePlatform::getSetTransactionIsolationSQL ($level) : string

Returns the SQL to set the transaction isolation level.

method Doctrine\DBAL\Platforms\OraclePlatform::_getTransactionIsolationLevelSQL ($level) : string

Returns the SQL for a given transaction isolation level Connection constant.

method Doctrine\DBAL\Platforms\OraclePlatform::getBooleanTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a boolean column.

method Doctrine\DBAL\Platforms\OraclePlatform::getIntegerTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a 4 byte integer column.

method Doctrine\DBAL\Platforms\OraclePlatform::getBigIntTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares an 8 byte integer column.

method Doctrine\DBAL\Platforms\OraclePlatform::getSmallIntTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a 2 byte integer column.

method Doctrine\DBAL\Platforms\OraclePlatform::getDateTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime fields in
statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\OraclePlatform::getDateTimeTzTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime with timezone offset fields.

method Doctrine\DBAL\Platforms\OraclePlatform::getDateTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create date fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\OraclePlatform::getTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create time fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\OraclePlatform::_getCommonIntegerTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares common properties of an integer column.

method Doctrine\DBAL\Platforms\OraclePlatform::getVarcharTypeDeclarationSQLSnippet ($length, $fixed) : string

method Doctrine\DBAL\Platforms\OraclePlatform::getBinaryTypeDeclarationSQLSnippet ($length, $fixed) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\OraclePlatform::getBinaryMaxLength () : int

Gets the maximum length of a binary field.

method Doctrine\DBAL\Platforms\OraclePlatform::getClobTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a CLOB column type.

method Doctrine\DBAL\Platforms\OraclePlatform::getListDatabasesSQL () : string

method Doctrine\DBAL\Platforms\OraclePlatform::getListSequencesSQL ($database) : string

method Doctrine\DBAL\Platforms\OraclePlatform::_getCreateTableSQL ($table, $columns, $options = []) : string[]

Returns the SQL used to create a table.

method Doctrine\DBAL\Platforms\OraclePlatform::getListTableIndexesSQL ($table, $currentDatabase = null) : string

Returns the list of indexes for the current database.

The current database parameter is optional but will always be passed
when using the SchemaManager API and is the database the given table is in.

Attention: Some platforms only support currentDatabase when they
are connected with that database. Cross-database information schema
requests may be impossible.

method Doctrine\DBAL\Platforms\OraclePlatform::getListTablesSQL () : string

method Doctrine\DBAL\Platforms\OraclePlatform::getListViewsSQL ($database) : string

Returns the SQL to list all views of a database or user.

method Doctrine\DBAL\Platforms\OraclePlatform::getCreateViewSQL ($name, $sql) : string

method Doctrine\DBAL\Platforms\OraclePlatform::getDropViewSQL ($name) : string

method Doctrine\DBAL\Platforms\OraclePlatform::getCreateAutoincrementSql ($name, $table, $start = 1) : string[]

method Doctrine\DBAL\Platforms\OraclePlatform::getDropAutoincrementSql ($table) : string[]

Returns the SQL statements to drop the autoincrement for the given table name.

method Doctrine\DBAL\Platforms\OraclePlatform::getListTableForeignKeysSQL ($table) : string

method Doctrine\DBAL\Platforms\OraclePlatform::getListTableConstraintsSQL ($table) : string

method Doctrine\DBAL\Platforms\OraclePlatform::getListTableColumnsSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\OraclePlatform::getDropSequenceSQL ($sequence) : string

Returns the SQL snippet to drop an existing sequence.

method Doctrine\DBAL\Platforms\OraclePlatform::getDropForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to drop a foreign key.

method Doctrine\DBAL\Platforms\OraclePlatform::getAdvancedForeignKeyOptionsSQL ($foreignKey) : string

Returns the FOREIGN KEY query section dealing with non-standard options
as MATCH, INITIALLY DEFERRED, ON UPDATE, ...

method Doctrine\DBAL\Platforms\OraclePlatform::getForeignKeyReferentialActionSQL ($action) : string

Returns the given referential action in uppercase if valid, otherwise throws an exception.

method Doctrine\DBAL\Platforms\OraclePlatform::getDropDatabaseSQL ($database) : string

Returns the SQL snippet to drop an existing database.

method Doctrine\DBAL\Platforms\OraclePlatform::getAlterTableSQL ($diff) : string[]

Gets the SQL statements for altering an existing table.

This method returns an array of SQL statements, since some platforms need several statements.

method Doctrine\DBAL\Platforms\OraclePlatform::getColumnDeclarationSQL ($name, $field) : string

Obtains DBMS specific SQL code portion needed to declare a generic type
field to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\OraclePlatform::getRenameIndexSQL ($oldIndexName, $index, $tableName) : string[]

Returns the SQL for renaming an index on a table.

method Doctrine\DBAL\Platforms\OraclePlatform::prefersSequences () : bool

Whether the platform prefers sequences for ID generation.
Subclasses should override this method to return TRUE if they prefer sequences.

method Doctrine\DBAL\Platforms\OraclePlatform::usesSequenceEmulatedIdentityColumns () : bool

Whether the platform emulates identity columns through sequences.

Some platforms that do not support identity columns natively
but support sequences can emulate identity columns by using
sequences.

method Doctrine\DBAL\Platforms\OraclePlatform::getIdentitySequenceName ($tableName, $columnName) : string

Returns the name of the sequence for a particular identity column in a particular table.

method Doctrine\DBAL\Platforms\OraclePlatform::supportsCommentOnStatement () : bool

Whether this platform support the proprietary syntax "COMMENT ON asset".

method Doctrine\DBAL\Platforms\OraclePlatform::getName () : string

Gets the name of the platform.

method Doctrine\DBAL\Platforms\OraclePlatform::doModifyLimitQuery ($query, $limit, $offset) : string

Adds an platform-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\OraclePlatform::getSQLResultCasing ($column) : string

Gets the character casing of a column in an SQL result set of this platform.

Oracle returns all column names in SQL result sets in uppercase.

method Doctrine\DBAL\Platforms\OraclePlatform::getCreateTemporaryTableSnippetSQL () : string

method Doctrine\DBAL\Platforms\OraclePlatform::getDateTimeTzFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime with timezone value of this platform.

method Doctrine\DBAL\Platforms\OraclePlatform::getDateFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored date value of this platform.

method Doctrine\DBAL\Platforms\OraclePlatform::getTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored time value of this platform.

method Doctrine\DBAL\Platforms\OraclePlatform::fixSchemaElementName ($schemaElementName) : string

Makes any fixes to a name of a schema element (table, sequence, ...) that are required
by restrictions of the platform, like a maximum length.

method Doctrine\DBAL\Platforms\OraclePlatform::getMaxIdentifierLength () : int

Maximum length of any given database identifier, like tables or column names.

method Doctrine\DBAL\Platforms\OraclePlatform::supportsSequences () : bool

Whether the platform supports sequences.

method Doctrine\DBAL\Platforms\OraclePlatform::supportsForeignKeyOnUpdate () : bool

Whether this platform supports onUpdate in foreign key constraints.

method Doctrine\DBAL\Platforms\OraclePlatform::supportsReleaseSavepoints () : bool

Whether the platform supports releasing savepoints.

method Doctrine\DBAL\Platforms\OraclePlatform::getTruncateTableSQL ($tableName, $cascade = false) : string

Generates a Truncate Table SQL statement for a given table.

Cascade is not supported on many platforms but would optionally cascade the truncate by
following the foreign keys.

method Doctrine\DBAL\Platforms\OraclePlatform::getDummySelectSQL () : string

This is for test reasons, many vendors have special requirements for dummy statements.

method Doctrine\DBAL\Platforms\OraclePlatform::initializeDoctrineTypeMappings () : void

Lazy load Doctrine Type Mappings.

method Doctrine\DBAL\Platforms\OraclePlatform::releaseSavePoint ($savepoint) : string

Returns the SQL to release a savepoint.

method Doctrine\DBAL\Platforms\OraclePlatform::getReservedKeywordsClass () : string

Returns the class name of the reserved keywords list.

method Doctrine\DBAL\Platforms\OraclePlatform::getBlobTypeDeclarationSQL ($field) : string

Returns the SQL Snippet used to declare a BLOB column type.

method Doctrine\DBAL\Platforms\OraclePlatform::getListTableCommentsSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\OraclePlatform::__construct () : void

method Doctrine\DBAL\Platforms\OraclePlatform::setEventManager ($eventManager) : void

Sets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\OraclePlatform::getEventManager () : Doctrine\Common\EventManager

Gets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\OraclePlatform::getVarcharTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a VARCHAR column type.

method Doctrine\DBAL\Platforms\OraclePlatform::getBinaryTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\OraclePlatform::getGuidTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a GUID/UUID field.

By default this maps directly to a CHAR(36) and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\OraclePlatform::getJsonTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a JSON field.

By default this maps directly to a CLOB and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\OraclePlatform::registerDoctrineTypeMapping ($dbType, $doctrineType) : void

Registers a doctrine type to be used in conjunction with a column type of this platform.

method Doctrine\DBAL\Platforms\OraclePlatform::getDoctrineTypeMapping ($dbType) : string

Gets the Doctrine type that is mapped for the given database column type.

method Doctrine\DBAL\Platforms\OraclePlatform::hasDoctrineTypeMappingFor ($dbType) : bool

Checks if a database type is currently supported by this platform.

method Doctrine\DBAL\Platforms\OraclePlatform::initializeCommentedDoctrineTypes () : void

Initializes the Doctrine Type comments instance variable for in_array() checks.

method Doctrine\DBAL\Platforms\OraclePlatform::isCommentedDoctrineType ($doctrineType) : bool

Is it necessary for the platform to add a parsable type comment to allow reverse engineering the given type?

method Doctrine\DBAL\Platforms\OraclePlatform::markDoctrineTypeCommented ($doctrineType) : void

Marks this type as to be commented in ALTER TABLE and CREATE TABLE statements.

method Doctrine\DBAL\Platforms\OraclePlatform::getDoctrineTypeComment ($doctrineType) : string

Gets the comment to append to a column comment that helps parsing this type in reverse engineering.

method Doctrine\DBAL\Platforms\OraclePlatform::getColumnComment ($column) : stringnull

Gets the comment of a passed column modified by potential doctrine type comment hints.

method Doctrine\DBAL\Platforms\OraclePlatform::getIdentifierQuoteCharacter () : string

Gets the character used for identifier quoting.

method Doctrine\DBAL\Platforms\OraclePlatform::getSqlCommentStartString () : string

Gets the string portion that starts an SQL comment.

method Doctrine\DBAL\Platforms\OraclePlatform::getSqlCommentEndString () : string

Gets the string portion that ends an SQL comment.

method Doctrine\DBAL\Platforms\OraclePlatform::getCharMaxLength () : int

Gets the maximum length of a char field.

method Doctrine\DBAL\Platforms\OraclePlatform::getVarcharMaxLength () : int

Gets the maximum length of a varchar field.

method Doctrine\DBAL\Platforms\OraclePlatform::getVarcharDefaultLength () : int

Gets the default length of a varchar field.

method Doctrine\DBAL\Platforms\OraclePlatform::getBinaryDefaultLength () : int

Gets the default length of a binary field.

method Doctrine\DBAL\Platforms\OraclePlatform::getWildcards () : string[]

Gets all SQL wildcard characters of the platform.

method Doctrine\DBAL\Platforms\OraclePlatform::getRegexpExpression () : string

Returns the regular expression operator.

method Doctrine\DBAL\Platforms\OraclePlatform::getAvgExpression ($column) : string

Returns the SQL snippet to get the average value of a column.

method Doctrine\DBAL\Platforms\OraclePlatform::getCountExpression ($column) : string

Returns the SQL snippet to get the number of rows (without a NULL value) of a column.

If a '*' is used instead of a column the number of selected rows is returned.

method Doctrine\DBAL\Platforms\OraclePlatform::getMaxExpression ($column) : string

Returns the SQL snippet to get the highest value of a column.

method Doctrine\DBAL\Platforms\OraclePlatform::getMinExpression ($column) : string

Returns the SQL snippet to get the lowest value of a column.

method Doctrine\DBAL\Platforms\OraclePlatform::getSumExpression ($column) : string

Returns the SQL snippet to get the total sum of a column.

method Doctrine\DBAL\Platforms\OraclePlatform::getMd5Expression ($column) : string

Returns the SQL snippet to get the md5 sum of a field.

Note: Not SQL92, but common functionality.

method Doctrine\DBAL\Platforms\OraclePlatform::getLengthExpression ($column) : string

Returns the SQL snippet to get the length of a text field.

method Doctrine\DBAL\Platforms\OraclePlatform::getSqrtExpression ($column) : string

Returns the SQL snippet to get the squared value of a column.

method Doctrine\DBAL\Platforms\OraclePlatform::getRoundExpression ($column, $decimals = 0) : string

Returns the SQL snippet to round a numeric field to the number of decimals specified.

method Doctrine\DBAL\Platforms\OraclePlatform::getModExpression ($expression1, $expression2) : string

Returns the SQL snippet to get the remainder of the division operation $expression1 / $expression2.

method Doctrine\DBAL\Platforms\OraclePlatform::getTrimExpression ($str, $mode = Doctrine\DBAL\Platforms\TrimMode::UNSPECIFIED, $char = false) : string

Returns the SQL snippet to trim a string.

method Doctrine\DBAL\Platforms\OraclePlatform::getRtrimExpression ($str) : string

Returns the SQL snippet to trim trailing space characters from the expression.

method Doctrine\DBAL\Platforms\OraclePlatform::getLtrimExpression ($str) : string

Returns the SQL snippet to trim leading space characters from the expression.

method Doctrine\DBAL\Platforms\OraclePlatform::getUpperExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to uppercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\OraclePlatform::getLowerExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to lowercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\OraclePlatform::getConcatExpression () : string

Returns a SQL snippet to concatenate the given expressions.

Accepts an arbitrary number of string parameters. Each parameter must contain an expression.

method Doctrine\DBAL\Platforms\OraclePlatform::getNotExpression ($expression) : string

Returns the SQL for a logical not.

Example:

$q = new Doctrine_Query();
$e = $q->expr;
$q->select('*')->from('table')
->where($e->eq('id', $e->not('null'));

method Doctrine\DBAL\Platforms\OraclePlatform::getIsNullExpression ($expression) : string

Returns the SQL that checks if an expression is null.

method Doctrine\DBAL\Platforms\OraclePlatform::getIsNotNullExpression ($expression) : string

Returns the SQL that checks if an expression is not null.

method Doctrine\DBAL\Platforms\OraclePlatform::getBetweenExpression ($expression, $value1, $value2) : string

Returns the SQL that checks if an expression evaluates to a value between two values.

The parameter $expression is checked if it is between $value1 and $value2.

Note: There is a slight difference in the way BETWEEN works on some databases.
http://www.w3schools.com/sql/sql_between.asp. If you want complete database
independence you should avoid using between().

method Doctrine\DBAL\Platforms\OraclePlatform::getAcosExpression ($value) : string

Returns the SQL to get the arccosine of a value.

method Doctrine\DBAL\Platforms\OraclePlatform::getSinExpression ($value) : string

Returns the SQL to get the sine of a value.

method Doctrine\DBAL\Platforms\OraclePlatform::getPiExpression () : string

Returns the SQL to get the PI value.

method Doctrine\DBAL\Platforms\OraclePlatform::getCosExpression ($value) : string

Returns the SQL to get the cosine of a value.

method Doctrine\DBAL\Platforms\OraclePlatform::getDateAddSecondsExpression ($date, $seconds) : string

Returns the SQL to add the number of given seconds to a date.

method Doctrine\DBAL\Platforms\OraclePlatform::getDateSubSecondsExpression ($date, $seconds) : string

Returns the SQL to subtract the number of given seconds from a date.

method Doctrine\DBAL\Platforms\OraclePlatform::getDateAddMinutesExpression ($date, $minutes) : string

Returns the SQL to add the number of given minutes to a date.

method Doctrine\DBAL\Platforms\OraclePlatform::getDateSubMinutesExpression ($date, $minutes) : string

Returns the SQL to subtract the number of given minutes from a date.

method Doctrine\DBAL\Platforms\OraclePlatform::getDateAddHourExpression ($date, $hours) : string

Returns the SQL to add the number of given hours to a date.

method Doctrine\DBAL\Platforms\OraclePlatform::getDateSubHourExpression ($date, $hours) : string

Returns the SQL to subtract the number of given hours to a date.

method Doctrine\DBAL\Platforms\OraclePlatform::getDateAddDaysExpression ($date, $days) : string

Returns the SQL to add the number of given days to a date.

method Doctrine\DBAL\Platforms\OraclePlatform::getDateSubDaysExpression ($date, $days) : string

Returns the SQL to subtract the number of given days to a date.

method Doctrine\DBAL\Platforms\OraclePlatform::getDateAddWeeksExpression ($date, $weeks) : string

Returns the SQL to add the number of given weeks to a date.

method Doctrine\DBAL\Platforms\OraclePlatform::getDateSubWeeksExpression ($date, $weeks) : string

Returns the SQL to subtract the number of given weeks from a date.

method Doctrine\DBAL\Platforms\OraclePlatform::getDateAddMonthExpression ($date, $months) : string

Returns the SQL to add the number of given months to a date.

method Doctrine\DBAL\Platforms\OraclePlatform::getDateSubMonthExpression ($date, $months) : string

Returns the SQL to subtract the number of given months to a date.

method Doctrine\DBAL\Platforms\OraclePlatform::getDateAddQuartersExpression ($date, $quarters) : string

Returns the SQL to add the number of given quarters to a date.

method Doctrine\DBAL\Platforms\OraclePlatform::getDateSubQuartersExpression ($date, $quarters) : string

Returns the SQL to subtract the number of given quarters from a date.

method Doctrine\DBAL\Platforms\OraclePlatform::getDateAddYearsExpression ($date, $years) : string

Returns the SQL to add the number of given years to a date.

method Doctrine\DBAL\Platforms\OraclePlatform::getDateSubYearsExpression ($date, $years) : string

Returns the SQL to subtract the number of given years from a date.

method Doctrine\DBAL\Platforms\OraclePlatform::getForUpdateSQL () : string

Returns the FOR UPDATE expression.

method Doctrine\DBAL\Platforms\OraclePlatform::appendLockHint ($fromClause, $lockMode) : string

Honors that some SQL vendors such as MsSql use table hints for locking instead of the ANSI SQL FOR UPDATE specification.

method Doctrine\DBAL\Platforms\OraclePlatform::getReadLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which locks rows in shared read lock.

This defaults to the ANSI SQL "FOR UPDATE", which is an exclusive lock (Write). Some database
vendors allow to lighten this constraint up to be a real read lock.

method Doctrine\DBAL\Platforms\OraclePlatform::getWriteLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which obtains an exclusive lock on the rows.

The semantics of this lock mode should equal the SELECT .. FOR UPDATE of the ANSI SQL standard.

method Doctrine\DBAL\Platforms\OraclePlatform::getDropTableSQL ($table) : string

Returns the SQL snippet to drop an existing table.

method Doctrine\DBAL\Platforms\OraclePlatform::getDropTemporaryTableSQL ($table) : string

Returns the SQL to safely drop a temporary table WITHOUT implicitly committing an open transaction.

method Doctrine\DBAL\Platforms\OraclePlatform::getDropIndexSQL ($index, $table = null) : string

Returns the SQL to drop an index from a table.

method Doctrine\DBAL\Platforms\OraclePlatform::getDropConstraintSQL ($constraint, $table) : string

Returns the SQL to drop a constraint.

method Doctrine\DBAL\Platforms\OraclePlatform::getCreateTableSQL ($table, $createFlags = self::CREATE_INDEXES) : string[]

Returns the SQL statement(s) to create a table with the specified name, columns and constraints
on this platform.

method Doctrine\DBAL\Platforms\OraclePlatform::getCommentOnTableSQL ($tableName, $comment) : string

method Doctrine\DBAL\Platforms\OraclePlatform::getCommentOnColumnSQL ($tableName, $columnName, $comment) : string

method Doctrine\DBAL\Platforms\OraclePlatform::getInlineColumnCommentSQL ($comment) : string

Returns the SQL to create inline comment on a column.

method Doctrine\DBAL\Platforms\OraclePlatform::getCreateConstraintSQL ($constraint, $table) : string

Returns the SQL to create a constraint on a table on this platform.

method Doctrine\DBAL\Platforms\OraclePlatform::getCreateIndexSQL ($index, $table) : string

Returns the SQL to create an index on a table on this platform.

method Doctrine\DBAL\Platforms\OraclePlatform::getPartialIndexSQL ($index) : string

Adds condition for partial index.

method Doctrine\DBAL\Platforms\OraclePlatform::getCreateIndexSQLFlags ($index) : string

Adds additional flags for index generation.

method Doctrine\DBAL\Platforms\OraclePlatform::getCreatePrimaryKeySQL ($index, $table) : string

Returns the SQL to create an unnamed primary key constraint.

method Doctrine\DBAL\Platforms\OraclePlatform::getCreateSchemaSQL ($schemaName) : string

Returns the SQL to create a named schema.

method Doctrine\DBAL\Platforms\OraclePlatform::quoteIdentifier ($str) : string

Quotes a string so that it can be safely used as a table or column name,
even if it is a reserved word of the platform. This also detects identifier
chains separated by dot and quotes them independently.

NOTE: Just because you CAN use quoted identifiers doesn't mean
you SHOULD use them. In general, they end up causing way more
problems than they solve.

method Doctrine\DBAL\Platforms\OraclePlatform::quoteSingleIdentifier ($str) : string

Quotes a single identifier (no dot chain separation).

method Doctrine\DBAL\Platforms\OraclePlatform::getCreateForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to create a new foreign key.

method Doctrine\DBAL\Platforms\OraclePlatform::onSchemaAlterTableAddColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\OraclePlatform::onSchemaAlterTableRemoveColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\OraclePlatform::onSchemaAlterTableChangeColumn ($columnDiff, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\OraclePlatform::onSchemaAlterTableRenameColumn ($oldColumnName, $column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\OraclePlatform::onSchemaAlterTable ($diff, &$sql) : bool

method Doctrine\DBAL\Platforms\OraclePlatform::getPreAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\OraclePlatform::getPostAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\OraclePlatform::_getAlterTableIndexForeignKeySQL ($diff) : string[]

Common code for alter table statement generation that updates the changed Index and Foreign Key definitions.

method Doctrine\DBAL\Platforms\OraclePlatform::getColumnDeclarationListSQL ($fields) : string

Gets declaration of a number of fields in bulk.

method Doctrine\DBAL\Platforms\OraclePlatform::getDecimalTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a floating point column of arbitrary precision.

method Doctrine\DBAL\Platforms\OraclePlatform::getDefaultValueDeclarationSQL ($field) : string

Obtains DBMS specific SQL code portion needed to set a default value
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\OraclePlatform::getCheckDeclarationSQL ($definition) : string

Obtains DBMS specific SQL code portion needed to set a CHECK constraint
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\OraclePlatform::getUniqueConstraintDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set a unique
constraint declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\OraclePlatform::getIndexDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\OraclePlatform::getCustomTypeDeclarationSQL ($columnDef) : string

Obtains SQL code portion needed to create a custom column,
e.g. when a field has the "columnDefinition" keyword.
Only "AUTOINCREMENT" and "PRIMARY KEY" are added if appropriate.

method Doctrine\DBAL\Platforms\OraclePlatform::getIndexFieldDeclarationListSQL ($columnsOrIndex) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\OraclePlatform::getTemporaryTableSQL () : string

Returns the required SQL string that fits between CREATE ... TABLE
to create the table as a temporary table.

Should be overridden in driver classes to return the correct string for the
specific database type.

The default is to return the string "TEMPORARY" - this will result in a
SQL error for any database that does not support temporary tables, or that
requires a different SQL command from "CREATE TEMPORARY TABLE".

method Doctrine\DBAL\Platforms\OraclePlatform::getTemporaryTableName ($tableName) : string

Some vendors require temporary table names to be qualified specially.

method Doctrine\DBAL\Platforms\OraclePlatform::getForeignKeyDeclarationSQL ($foreignKey) : string

Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\OraclePlatform::getForeignKeyBaseDeclarationSQL ($foreignKey) : string

Obtains DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\OraclePlatform::getUniqueFieldDeclarationSQL () : string

Obtains DBMS specific SQL code portion needed to set the UNIQUE constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\OraclePlatform::getColumnCharsetDeclarationSQL ($charset) : string

Obtains DBMS specific SQL code portion needed to set the CHARACTER SET
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\OraclePlatform::getColumnCollationDeclarationSQL ($collation) : string

Obtains DBMS specific SQL code portion needed to set the COLLATION
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\OraclePlatform::prefersIdentityColumns () : bool

Whether the platform prefers identity columns (eg. autoincrement) for ID generation.
Subclasses should override this method to return TRUE if they prefer identity columns.

method Doctrine\DBAL\Platforms\OraclePlatform::convertBooleans ($item) : mixed

Some platforms need the boolean values to be converted.

The default conversion in this implementation converts to integers (false => 0, true => 1).

Note: if the input is not a boolean the original input might be returned.

There are two contexts when converting booleans: Literals and Prepared Statements.
This method should handle the literal case

method Doctrine\DBAL\Platforms\OraclePlatform::convertFromBoolean ($item) : boolnull

Some platforms have boolean literals that needs to be correctly converted

The default conversion tries to convert value into bool "(bool)$item"

method Doctrine\DBAL\Platforms\OraclePlatform::convertBooleansToDatabaseValue ($item) : mixed

This method should handle the prepared statements case. When there is no
distinction, it's OK to use the same method.

Note: if the input is not a boolean the original input might be returned.

method Doctrine\DBAL\Platforms\OraclePlatform::getCurrentDateSQL () : string

Returns the SQL specific for the platform to get the current date.

method Doctrine\DBAL\Platforms\OraclePlatform::getCurrentTimeSQL () : string

Returns the SQL specific for the platform to get the current time.

method Doctrine\DBAL\Platforms\OraclePlatform::getCurrentTimestampSQL () : string

Returns the SQL specific for the platform to get the current timestamp

method Doctrine\DBAL\Platforms\OraclePlatform::getListNamespacesSQL () : string

Returns the SQL statement for retrieving the namespaces defined in the database.

method Doctrine\DBAL\Platforms\OraclePlatform::getListUsersSQL () : string

method Doctrine\DBAL\Platforms\OraclePlatform::getCreateDatabaseSQL ($database) : string

Returns the SQL to create a new database.

method Doctrine\DBAL\Platforms\OraclePlatform::getFloatDeclarationSQL ($fieldDeclaration) : string

method Doctrine\DBAL\Platforms\OraclePlatform::getDefaultTransactionIsolationLevel () : int

Gets the default transaction isolation level of the platform.

method Doctrine\DBAL\Platforms\OraclePlatform::supportsIdentityColumns () : bool

Whether the platform supports identity columns.

Identity columns are columns that receive an auto-generated value from the
database on insert of a row.

method Doctrine\DBAL\Platforms\OraclePlatform::supportsIndexes () : bool

Whether the platform supports indexes.

method Doctrine\DBAL\Platforms\OraclePlatform::supportsPartialIndexes () : bool

Whether the platform supports partial indexes.

method Doctrine\DBAL\Platforms\OraclePlatform::supportsColumnLengthIndexes () : bool

Whether the platform supports indexes with column length definitions.

method Doctrine\DBAL\Platforms\OraclePlatform::supportsAlterTable () : bool

Whether the platform supports altering tables.

method Doctrine\DBAL\Platforms\OraclePlatform::supportsTransactions () : bool

Whether the platform supports transactions.

method Doctrine\DBAL\Platforms\OraclePlatform::supportsSavepoints () : bool

Whether the platform supports savepoints.

method Doctrine\DBAL\Platforms\OraclePlatform::supportsPrimaryConstraints () : bool

Whether the platform supports primary key constraints.

method Doctrine\DBAL\Platforms\OraclePlatform::supportsForeignKeyConstraints () : bool

Whether the platform supports foreign key constraints.

method Doctrine\DBAL\Platforms\OraclePlatform::supportsSchemas () : bool

Whether the platform supports database schemas.

method Doctrine\DBAL\Platforms\OraclePlatform::canEmulateSchemas () : bool

Whether this platform can emulate schemas.

Platforms that either support or emulate schemas don't automatically
filter a schema for the namespaced elements in {@link
AbstractManager#createSchema}.

method Doctrine\DBAL\Platforms\OraclePlatform::getDefaultSchemaName () : string

Returns the default schema name.

method Doctrine\DBAL\Platforms\OraclePlatform::supportsCreateDropDatabase () : bool

Whether this platform supports create database.

Some databases don't allow to create and drop databases at all or only with certain tools.

method Doctrine\DBAL\Platforms\OraclePlatform::supportsGettingAffectedRows () : bool

Whether the platform supports getting the affected rows of a recent update/delete type query.

method Doctrine\DBAL\Platforms\OraclePlatform::supportsInlineColumnComments () : bool

Whether this platform support to add inline column comments as postfix.

method Doctrine\DBAL\Platforms\OraclePlatform::hasNativeGuidType () : bool

Does this platform have native guid type.

method Doctrine\DBAL\Platforms\OraclePlatform::hasNativeJsonType () : bool

Does this platform have native JSON type.

method Doctrine\DBAL\Platforms\OraclePlatform::getIdentityColumnNullInsertSQL () : void

method Doctrine\DBAL\Platforms\OraclePlatform::supportsViews () : bool

Whether this platform supports views.

method Doctrine\DBAL\Platforms\OraclePlatform::supportsColumnCollation () : bool

Does this platform support column collation?

method Doctrine\DBAL\Platforms\OraclePlatform::getDateTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime value of this platform.

method Doctrine\DBAL\Platforms\OraclePlatform::modifyLimitQuery ($query, $limit, $offset = null) : string

Adds an driver-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\OraclePlatform::supportsLimitOffset () : bool

Whether the database platform support offsets in modify limit clauses.

method Doctrine\DBAL\Platforms\OraclePlatform::getEmptyIdentityInsertSQL ($tableName, $identifierColumnName) : string

Returns the insert SQL for an empty insert statement.

method Doctrine\DBAL\Platforms\OraclePlatform::createSavePoint ($savepoint) : string

Returns the SQL to create a new savepoint.

method Doctrine\DBAL\Platforms\OraclePlatform::rollbackSavePoint ($savepoint) : string

Returns the SQL to rollback a savepoint.

method Doctrine\DBAL\Platforms\OraclePlatform::getReservedKeywordsList () : Doctrine\DBAL\Platforms\Keywords\KeywordList

Returns the keyword list instance of this platform.

method Doctrine\DBAL\Platforms\OraclePlatform::quoteStringLiteral ($str) : string

Quotes a literal string.
This method is NOT meant to fix SQL injections!
It is only meant to escape this platform's string literal
quote character inside the given literal string.

method Doctrine\DBAL\Platforms\OraclePlatform::getStringLiteralQuoteCharacter () : string

Gets the character used for string literal quoting.

method Doctrine\DBAL\Platforms\OraclePlatform::escapeStringForLike ($inputString, $escapeChar) : string

Escapes metacharacters in a string intended to be used with a LIKE
operator.

method Doctrine\DBAL\Platforms\OraclePlatform::getLikeWildcardCharacters () : string

class Doctrine\DBAL\Platforms::PostgreSqlPlatform

PostgreSqlPlatform.

classconstant integer Doctrine\DBAL\Platforms\PostgreSqlPlatform::CREATE_INDEXES

classconstant integer Doctrine\DBAL\Platforms\PostgreSqlPlatform::CREATE_FOREIGNKEYS

classconstant string Doctrine\DBAL\Platforms\PostgreSqlPlatform::DATE_INTERVAL_UNIT_SECOND

classconstant string Doctrine\DBAL\Platforms\PostgreSqlPlatform::DATE_INTERVAL_UNIT_MINUTE

classconstant string Doctrine\DBAL\Platforms\PostgreSqlPlatform::DATE_INTERVAL_UNIT_HOUR

classconstant string Doctrine\DBAL\Platforms\PostgreSqlPlatform::DATE_INTERVAL_UNIT_DAY

classconstant string Doctrine\DBAL\Platforms\PostgreSqlPlatform::DATE_INTERVAL_UNIT_WEEK

classconstant string Doctrine\DBAL\Platforms\PostgreSqlPlatform::DATE_INTERVAL_UNIT_MONTH

classconstant string Doctrine\DBAL\Platforms\PostgreSqlPlatform::DATE_INTERVAL_UNIT_QUARTER

classconstant string Doctrine\DBAL\Platforms\PostgreSqlPlatform::DATE_INTERVAL_UNIT_YEAR

classconstant integer Doctrine\DBAL\Platforms\PostgreSqlPlatform::TRIM_UNSPECIFIED

classconstant integer Doctrine\DBAL\Platforms\PostgreSqlPlatform::TRIM_LEADING

classconstant integer Doctrine\DBAL\Platforms\PostgreSqlPlatform::TRIM_TRAILING

classconstant integer Doctrine\DBAL\Platforms\PostgreSqlPlatform::TRIM_BOTH

property string[]null Doctrine\DBAL\Platforms\PostgreSqlPlatform::doctrineTypeMapping

property string[]null Doctrine\DBAL\Platforms\PostgreSqlPlatform::doctrineTypeComments

Contains a list of all columns that should generate parseable column comments for type-detection
in reverse engineering scenarios.

property Doctrine\Common\EventManager Doctrine\DBAL\Platforms\PostgreSqlPlatform::_eventManager

property Doctrine\DBAL\Platforms\Keywords\KeywordListnull Doctrine\DBAL\Platforms\PostgreSqlPlatform::_keywords

Holds the KeywordList instance for the current platform.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::setUseBooleanTrueFalseStrings ($flag) : void

PostgreSQL has different behavior with some drivers
with regard to how booleans have to be handled.

Enables use of 'true'/'false' or otherwise 1 and 0 instead.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getSubstringExpression ($value, $from, $length = null) : string

Returns a SQL snippet to get a substring inside an SQL statement.

Note: Not SQL92, but common functionality.

SQLite only supports the 2 parameter variant of this function.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getNowExpression () : string

Returns the SQL snippet to get the current system date.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getRegexpExpression () : string

Returns the regular expression operator.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getLocateExpression ($str, $substr, $startPos = false) : string

Returns the SQL snippet to get the position of the first occurrence of substring $substr in string $str.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDateArithmeticIntervalExpression ($date, $operator, $interval, $unit) : string

Returns the SQL for a date arithmetic expression.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDateDiffExpression ($date1, $date2) : string

Returns the SQL to calculate the difference in days between the two passed dates.

Computes diff = date1 - date2.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::supportsSequences () : bool

Whether the platform supports sequences.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::supportsSchemas () : bool

Whether the platform supports database schemas.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDefaultSchemaName () : string

Returns the default schema name.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::supportsIdentityColumns () : bool

Whether the platform supports identity columns.

Identity columns are columns that receive an auto-generated value from the
database on insert of a row.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::supportsPartialIndexes () : bool

Whether the platform supports partial indexes.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::usesSequenceEmulatedIdentityColumns () : bool

Whether the platform emulates identity columns through sequences.

Some platforms that do not support identity columns natively
but support sequences can emulate identity columns by using
sequences.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getIdentitySequenceName ($tableName, $columnName) : string

Returns the name of the sequence for a particular identity column in a particular table.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::supportsCommentOnStatement () : bool

Whether this platform support the proprietary syntax "COMMENT ON asset".

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::prefersSequences () : bool

Whether the platform prefers sequences for ID generation.
Subclasses should override this method to return TRUE if they prefer sequences.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::hasNativeGuidType () : bool

Does this platform have native guid type.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getListDatabasesSQL () : string

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getListNamespacesSQL () : string

Returns the SQL statement for retrieving the namespaces defined in the database.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getListSequencesSQL ($database) : string

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getListTablesSQL () : string

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getListViewsSQL ($database) : string

Returns the SQL to list all views of a database or user.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getListTableForeignKeysSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getCreateViewSQL ($name, $sql) : string

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDropViewSQL ($name) : string

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getListTableConstraintsSQL ($table) : string

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getListTableIndexesSQL ($table, $currentDatabase = null) : string

Returns the list of indexes for the current database.

The current database parameter is optional but will always be passed
when using the SchemaManager API and is the database the given table is in.

Attention: Some platforms only support currentDatabase when they
are connected with that database. Cross-database information schema
requests may be impossible.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getListTableColumnsSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getCreateDatabaseSQL ($name) : string

Returns the SQL to create a new database.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDisallowDatabaseConnectionsSQL ($database) : string

Returns the SQL statement for disallowing new connections on the given database.

This is useful to force DROP DATABASE operations which could fail because of active connections.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getCloseActiveDatabaseConnectionsSQL ($database) : string

Returns the SQL statement for closing currently active connections on the given database.

This is useful to force DROP DATABASE operations which could fail because of active connections.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getAdvancedForeignKeyOptionsSQL ($foreignKey) : string

Returns the FOREIGN KEY query section dealing with non-standard options
as MATCH, INITIALLY DEFERRED, ON UPDATE, ...

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getAlterTableSQL ($diff) : string[]

Gets the SQL statements for altering an existing table.

This method returns an array of SQL statements, since some platforms need several statements.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getRenameIndexSQL ($oldIndexName, $index, $tableName) : string[]

Returns the SQL for renaming an index on a table.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getCommentOnColumnSQL ($tableName, $columnName, $comment) : string

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getCreateSequenceSQL ($sequence) : string

Returns the SQL to create a sequence on this platform.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getAlterSequenceSQL ($sequence) : string

Returns the SQL to change a sequence on this platform.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDropSequenceSQL ($sequence) : string

Returns the SQL snippet to drop an existing sequence.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getCreateSchemaSQL ($schemaName) : string

Returns the SQL to create a named schema.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDropForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to drop a foreign key.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::_getCreateTableSQL ($tableName, $columns, $options = []) : string[]

Returns the SQL used to create a table.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::convertBooleans ($item) : mixed

Some platforms need the boolean values to be converted.

The default conversion in this implementation converts to integers (false => 0, true => 1).

Note: if the input is not a boolean the original input might be returned.

There are two contexts when converting booleans: Literals and Prepared Statements.
This method should handle the literal case

Postgres wants boolean values converted to the strings 'true'/'false'.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::convertBooleansToDatabaseValue ($item) : mixed

This method should handle the prepared statements case. When there is no
distinction, it's OK to use the same method.

Note: if the input is not a boolean the original input might be returned.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::convertFromBoolean ($item) : boolnull

Some platforms have boolean literals that needs to be correctly converted

The default conversion tries to convert value into bool "(bool)$item"

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getSequenceNextValSQL ($sequenceName) : string

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getSetTransactionIsolationSQL ($level) : string

Returns the SQL to set the transaction isolation level.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getBooleanTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a boolean column.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getIntegerTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a 4 byte integer column.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getBigIntTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares an 8 byte integer column.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getSmallIntTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a 2 byte integer column.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getGuidTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a GUID/UUID field.

By default this maps directly to a CHAR(36) and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDateTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime fields in
statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDateTimeTzTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime with timezone offset fields.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDateTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create date fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create time fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getGuidExpression () : string

Returns the global unique identifier expression.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::_getCommonIntegerTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares common properties of an integer column.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getVarcharTypeDeclarationSQLSnippet ($length, $fixed) : string

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getBinaryTypeDeclarationSQLSnippet ($length, $fixed) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getClobTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a CLOB column type.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getName () : string

Gets the name of the platform.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getSQLResultCasing ($column) : string

Gets the character casing of a column in an SQL result set of this platform.

PostgreSQL returns all column names in SQL result sets in lowercase.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDateTimeTzFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime with timezone value of this platform.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getEmptyIdentityInsertSQL ($quotedTableName, $quotedIdentifierColumnName) : string

Returns the insert SQL for an empty insert statement.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getTruncateTableSQL ($tableName, $cascade = false) : string

Generates a Truncate Table SQL statement for a given table.

Cascade is not supported on many platforms but would optionally cascade the truncate by
following the foreign keys.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getReadLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which locks rows in shared read lock.

This defaults to the ANSI SQL "FOR UPDATE", which is an exclusive lock (Write). Some database
vendors allow to lighten this constraint up to be a real read lock.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::initializeDoctrineTypeMappings () : void

Lazy load Doctrine Type Mappings.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getVarcharMaxLength () : int

Gets the maximum length of a varchar field.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getBinaryMaxLength () : int

Gets the maximum length of a binary field.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getBinaryDefaultLength () : int

Gets the default length of a binary field.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getReservedKeywordsClass () : string

Returns the class name of the reserved keywords list.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getBlobTypeDeclarationSQL ($field) : string

Returns the SQL Snippet used to declare a BLOB column type.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDefaultValueDeclarationSQL ($field) : string

Obtains DBMS specific SQL code portion needed to set a default value
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getListTableMetadataSQL ($table, $schema = null) : string

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::__construct () : void

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::setEventManager ($eventManager) : void

Sets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getEventManager () : Doctrine\Common\EventManager

Gets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getVarcharTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a VARCHAR column type.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getBinaryTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getJsonTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a JSON field.

By default this maps directly to a CLOB and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::registerDoctrineTypeMapping ($dbType, $doctrineType) : void

Registers a doctrine type to be used in conjunction with a column type of this platform.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDoctrineTypeMapping ($dbType) : string

Gets the Doctrine type that is mapped for the given database column type.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::hasDoctrineTypeMappingFor ($dbType) : bool

Checks if a database type is currently supported by this platform.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::initializeCommentedDoctrineTypes () : void

Initializes the Doctrine Type comments instance variable for in_array() checks.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::isCommentedDoctrineType ($doctrineType) : bool

Is it necessary for the platform to add a parsable type comment to allow reverse engineering the given type?

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::markDoctrineTypeCommented ($doctrineType) : void

Marks this type as to be commented in ALTER TABLE and CREATE TABLE statements.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDoctrineTypeComment ($doctrineType) : string

Gets the comment to append to a column comment that helps parsing this type in reverse engineering.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getColumnComment ($column) : stringnull

Gets the comment of a passed column modified by potential doctrine type comment hints.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getIdentifierQuoteCharacter () : string

Gets the character used for identifier quoting.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getSqlCommentStartString () : string

Gets the string portion that starts an SQL comment.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getSqlCommentEndString () : string

Gets the string portion that ends an SQL comment.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getCharMaxLength () : int

Gets the maximum length of a char field.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getVarcharDefaultLength () : int

Gets the default length of a varchar field.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getWildcards () : string[]

Gets all SQL wildcard characters of the platform.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getAvgExpression ($column) : string

Returns the SQL snippet to get the average value of a column.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getCountExpression ($column) : string

Returns the SQL snippet to get the number of rows (without a NULL value) of a column.

If a '*' is used instead of a column the number of selected rows is returned.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getMaxExpression ($column) : string

Returns the SQL snippet to get the highest value of a column.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getMinExpression ($column) : string

Returns the SQL snippet to get the lowest value of a column.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getSumExpression ($column) : string

Returns the SQL snippet to get the total sum of a column.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getMd5Expression ($column) : string

Returns the SQL snippet to get the md5 sum of a field.

Note: Not SQL92, but common functionality.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getLengthExpression ($column) : string

Returns the SQL snippet to get the length of a text field.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getSqrtExpression ($column) : string

Returns the SQL snippet to get the squared value of a column.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getRoundExpression ($column, $decimals = 0) : string

Returns the SQL snippet to round a numeric field to the number of decimals specified.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getModExpression ($expression1, $expression2) : string

Returns the SQL snippet to get the remainder of the division operation $expression1 / $expression2.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getTrimExpression ($str, $mode = Doctrine\DBAL\Platforms\TrimMode::UNSPECIFIED, $char = false) : string

Returns the SQL snippet to trim a string.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getRtrimExpression ($str) : string

Returns the SQL snippet to trim trailing space characters from the expression.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getLtrimExpression ($str) : string

Returns the SQL snippet to trim leading space characters from the expression.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getUpperExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to uppercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getLowerExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to lowercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getConcatExpression () : string

Returns a SQL snippet to concatenate the given expressions.

Accepts an arbitrary number of string parameters. Each parameter must contain an expression.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getNotExpression ($expression) : string

Returns the SQL for a logical not.

Example:

$q = new Doctrine_Query();
$e = $q->expr;
$q->select('*')->from('table')
->where($e->eq('id', $e->not('null'));

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getIsNullExpression ($expression) : string

Returns the SQL that checks if an expression is null.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getIsNotNullExpression ($expression) : string

Returns the SQL that checks if an expression is not null.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getBetweenExpression ($expression, $value1, $value2) : string

Returns the SQL that checks if an expression evaluates to a value between two values.

The parameter $expression is checked if it is between $value1 and $value2.

Note: There is a slight difference in the way BETWEEN works on some databases.
http://www.w3schools.com/sql/sql_between.asp. If you want complete database
independence you should avoid using between().

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getAcosExpression ($value) : string

Returns the SQL to get the arccosine of a value.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getSinExpression ($value) : string

Returns the SQL to get the sine of a value.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getPiExpression () : string

Returns the SQL to get the PI value.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getCosExpression ($value) : string

Returns the SQL to get the cosine of a value.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDateAddSecondsExpression ($date, $seconds) : string

Returns the SQL to add the number of given seconds to a date.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDateSubSecondsExpression ($date, $seconds) : string

Returns the SQL to subtract the number of given seconds from a date.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDateAddMinutesExpression ($date, $minutes) : string

Returns the SQL to add the number of given minutes to a date.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDateSubMinutesExpression ($date, $minutes) : string

Returns the SQL to subtract the number of given minutes from a date.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDateAddHourExpression ($date, $hours) : string

Returns the SQL to add the number of given hours to a date.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDateSubHourExpression ($date, $hours) : string

Returns the SQL to subtract the number of given hours to a date.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDateAddDaysExpression ($date, $days) : string

Returns the SQL to add the number of given days to a date.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDateSubDaysExpression ($date, $days) : string

Returns the SQL to subtract the number of given days to a date.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDateAddWeeksExpression ($date, $weeks) : string

Returns the SQL to add the number of given weeks to a date.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDateSubWeeksExpression ($date, $weeks) : string

Returns the SQL to subtract the number of given weeks from a date.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDateAddMonthExpression ($date, $months) : string

Returns the SQL to add the number of given months to a date.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDateSubMonthExpression ($date, $months) : string

Returns the SQL to subtract the number of given months to a date.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDateAddQuartersExpression ($date, $quarters) : string

Returns the SQL to add the number of given quarters to a date.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDateSubQuartersExpression ($date, $quarters) : string

Returns the SQL to subtract the number of given quarters from a date.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDateAddYearsExpression ($date, $years) : string

Returns the SQL to add the number of given years to a date.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDateSubYearsExpression ($date, $years) : string

Returns the SQL to subtract the number of given years from a date.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getBitAndComparisonExpression ($value1, $value2) : string

Returns the SQL bit AND comparison expression.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getBitOrComparisonExpression ($value1, $value2) : string

Returns the SQL bit OR comparison expression.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getForUpdateSQL () : string

Returns the FOR UPDATE expression.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::appendLockHint ($fromClause, $lockMode) : string

Honors that some SQL vendors such as MsSql use table hints for locking instead of the ANSI SQL FOR UPDATE specification.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getWriteLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which obtains an exclusive lock on the rows.

The semantics of this lock mode should equal the SELECT .. FOR UPDATE of the ANSI SQL standard.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDropDatabaseSQL ($database) : string

Returns the SQL snippet to drop an existing database.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDropTableSQL ($table) : string

Returns the SQL snippet to drop an existing table.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDropTemporaryTableSQL ($table) : string

Returns the SQL to safely drop a temporary table WITHOUT implicitly committing an open transaction.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDropIndexSQL ($index, $table = null) : string

Returns the SQL to drop an index from a table.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDropConstraintSQL ($constraint, $table) : string

Returns the SQL to drop a constraint.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getCreateTableSQL ($table, $createFlags = self::CREATE_INDEXES) : string[]

Returns the SQL statement(s) to create a table with the specified name, columns and constraints
on this platform.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getCommentOnTableSQL ($tableName, $comment) : string

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getInlineColumnCommentSQL ($comment) : string

Returns the SQL to create inline comment on a column.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getCreateTemporaryTableSnippetSQL () : string

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getCreateConstraintSQL ($constraint, $table) : string

Returns the SQL to create a constraint on a table on this platform.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getCreateIndexSQL ($index, $table) : string

Returns the SQL to create an index on a table on this platform.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getPartialIndexSQL ($index) : string

Adds condition for partial index.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getCreateIndexSQLFlags ($index) : string

Adds additional flags for index generation.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getCreatePrimaryKeySQL ($index, $table) : string

Returns the SQL to create an unnamed primary key constraint.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::quoteIdentifier ($str) : string

Quotes a string so that it can be safely used as a table or column name,
even if it is a reserved word of the platform. This also detects identifier
chains separated by dot and quotes them independently.

NOTE: Just because you CAN use quoted identifiers doesn't mean
you SHOULD use them. In general, they end up causing way more
problems than they solve.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::quoteSingleIdentifier ($str) : string

Quotes a single identifier (no dot chain separation).

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getCreateForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to create a new foreign key.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::onSchemaAlterTableAddColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::onSchemaAlterTableRemoveColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::onSchemaAlterTableChangeColumn ($columnDiff, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::onSchemaAlterTableRenameColumn ($oldColumnName, $column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::onSchemaAlterTable ($diff, &$sql) : bool

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getPreAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getPostAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::_getAlterTableIndexForeignKeySQL ($diff) : string[]

Common code for alter table statement generation that updates the changed Index and Foreign Key definitions.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getColumnDeclarationListSQL ($fields) : string

Gets declaration of a number of fields in bulk.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getColumnDeclarationSQL ($name, $field) : string

Obtains DBMS specific SQL code portion needed to declare a generic type
field to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDecimalTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a floating point column of arbitrary precision.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getCheckDeclarationSQL ($definition) : string

Obtains DBMS specific SQL code portion needed to set a CHECK constraint
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getUniqueConstraintDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set a unique
constraint declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getIndexDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getCustomTypeDeclarationSQL ($columnDef) : string

Obtains SQL code portion needed to create a custom column,
e.g. when a field has the "columnDefinition" keyword.
Only "AUTOINCREMENT" and "PRIMARY KEY" are added if appropriate.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getIndexFieldDeclarationListSQL ($columnsOrIndex) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getTemporaryTableSQL () : string

Returns the required SQL string that fits between CREATE ... TABLE
to create the table as a temporary table.

Should be overridden in driver classes to return the correct string for the
specific database type.

The default is to return the string "TEMPORARY" - this will result in a
SQL error for any database that does not support temporary tables, or that
requires a different SQL command from "CREATE TEMPORARY TABLE".

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getTemporaryTableName ($tableName) : string

Some vendors require temporary table names to be qualified specially.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getForeignKeyDeclarationSQL ($foreignKey) : string

Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getForeignKeyReferentialActionSQL ($action) : string

Returns the given referential action in uppercase if valid, otherwise throws an exception.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getForeignKeyBaseDeclarationSQL ($foreignKey) : string

Obtains DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getUniqueFieldDeclarationSQL () : string

Obtains DBMS specific SQL code portion needed to set the UNIQUE constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getColumnCharsetDeclarationSQL ($charset) : string

Obtains DBMS specific SQL code portion needed to set the CHARACTER SET
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getColumnCollationDeclarationSQL ($collation) : string

Obtains DBMS specific SQL code portion needed to set the COLLATION
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::prefersIdentityColumns () : bool

Whether the platform prefers identity columns (eg. autoincrement) for ID generation.
Subclasses should override this method to return TRUE if they prefer identity columns.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getCurrentDateSQL () : string

Returns the SQL specific for the platform to get the current date.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getCurrentTimeSQL () : string

Returns the SQL specific for the platform to get the current time.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getCurrentTimestampSQL () : string

Returns the SQL specific for the platform to get the current timestamp

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::_getTransactionIsolationLevelSQL ($level) : string

Returns the SQL for a given transaction isolation level Connection constant.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getListUsersSQL () : string

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getFloatDeclarationSQL ($fieldDeclaration) : string

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDefaultTransactionIsolationLevel () : int

Gets the default transaction isolation level of the platform.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::supportsIndexes () : bool

Whether the platform supports indexes.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::supportsColumnLengthIndexes () : bool

Whether the platform supports indexes with column length definitions.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::supportsAlterTable () : bool

Whether the platform supports altering tables.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::supportsTransactions () : bool

Whether the platform supports transactions.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::supportsSavepoints () : bool

Whether the platform supports savepoints.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::supportsReleaseSavepoints () : bool

Whether the platform supports releasing savepoints.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::supportsPrimaryConstraints () : bool

Whether the platform supports primary key constraints.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::supportsForeignKeyConstraints () : bool

Whether the platform supports foreign key constraints.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::supportsForeignKeyOnUpdate () : bool

Whether this platform supports onUpdate in foreign key constraints.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::canEmulateSchemas () : bool

Whether this platform can emulate schemas.

Platforms that either support or emulate schemas don't automatically
filter a schema for the namespaced elements in {@link
AbstractManager#createSchema}.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::supportsCreateDropDatabase () : bool

Whether this platform supports create database.

Some databases don't allow to create and drop databases at all or only with certain tools.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::supportsGettingAffectedRows () : bool

Whether the platform supports getting the affected rows of a recent update/delete type query.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::supportsInlineColumnComments () : bool

Whether this platform support to add inline column comments as postfix.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::hasNativeJsonType () : bool

Does this platform have native JSON type.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getIdentityColumnNullInsertSQL () : void

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::supportsViews () : bool

Whether this platform supports views.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::supportsColumnCollation () : bool

Does this platform support column collation?

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDateTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime value of this platform.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDateFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored date value of this platform.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored time value of this platform.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::modifyLimitQuery ($query, $limit, $offset = null) : string

Adds an driver-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::doModifyLimitQuery ($query, $limit, $offset) : string

Adds an platform-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::supportsLimitOffset () : bool

Whether the database platform support offsets in modify limit clauses.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::fixSchemaElementName ($schemaElementName) : string

Makes any fixes to a name of a schema element (table, sequence, ...) that are required
by restrictions of the platform, like a maximum length.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getMaxIdentifierLength () : int

Maximum length of any given database identifier, like tables or column names.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getDummySelectSQL () : string

This is for test reasons, many vendors have special requirements for dummy statements.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::createSavePoint ($savepoint) : string

Returns the SQL to create a new savepoint.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::releaseSavePoint ($savepoint) : string

Returns the SQL to release a savepoint.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::rollbackSavePoint ($savepoint) : string

Returns the SQL to rollback a savepoint.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getReservedKeywordsList () : Doctrine\DBAL\Platforms\Keywords\KeywordList

Returns the keyword list instance of this platform.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::quoteStringLiteral ($str) : string

Quotes a literal string.
This method is NOT meant to fix SQL injections!
It is only meant to escape this platform's string literal
quote character inside the given literal string.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getStringLiteralQuoteCharacter () : string

Gets the character used for string literal quoting.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::escapeStringForLike ($inputString, $escapeChar) : string

Escapes metacharacters in a string intended to be used with a LIKE
operator.

method Doctrine\DBAL\Platforms\PostgreSqlPlatform::getLikeWildcardCharacters () : string

class Doctrine\DBAL\Platforms::PostgreSQL91Platform

Provides the behavior, features and SQL dialect of the PostgreSQL 9.1 database platform.

classconstant integer Doctrine\DBAL\Platforms\PostgreSQL91Platform::CREATE_INDEXES

classconstant integer Doctrine\DBAL\Platforms\PostgreSQL91Platform::CREATE_FOREIGNKEYS

classconstant string Doctrine\DBAL\Platforms\PostgreSQL91Platform::DATE_INTERVAL_UNIT_SECOND

classconstant string Doctrine\DBAL\Platforms\PostgreSQL91Platform::DATE_INTERVAL_UNIT_MINUTE

classconstant string Doctrine\DBAL\Platforms\PostgreSQL91Platform::DATE_INTERVAL_UNIT_HOUR

classconstant string Doctrine\DBAL\Platforms\PostgreSQL91Platform::DATE_INTERVAL_UNIT_DAY

classconstant string Doctrine\DBAL\Platforms\PostgreSQL91Platform::DATE_INTERVAL_UNIT_WEEK

classconstant string Doctrine\DBAL\Platforms\PostgreSQL91Platform::DATE_INTERVAL_UNIT_MONTH

classconstant string Doctrine\DBAL\Platforms\PostgreSQL91Platform::DATE_INTERVAL_UNIT_QUARTER

classconstant string Doctrine\DBAL\Platforms\PostgreSQL91Platform::DATE_INTERVAL_UNIT_YEAR

classconstant integer Doctrine\DBAL\Platforms\PostgreSQL91Platform::TRIM_UNSPECIFIED

classconstant integer Doctrine\DBAL\Platforms\PostgreSQL91Platform::TRIM_LEADING

classconstant integer Doctrine\DBAL\Platforms\PostgreSQL91Platform::TRIM_TRAILING

classconstant integer Doctrine\DBAL\Platforms\PostgreSQL91Platform::TRIM_BOTH

property string[]null Doctrine\DBAL\Platforms\PostgreSQL91Platform::doctrineTypeMapping

property string[]null Doctrine\DBAL\Platforms\PostgreSQL91Platform::doctrineTypeComments

Contains a list of all columns that should generate parseable column comments for type-detection
in reverse engineering scenarios.

property Doctrine\Common\EventManager Doctrine\DBAL\Platforms\PostgreSQL91Platform::_eventManager

property Doctrine\DBAL\Platforms\Keywords\KeywordListnull Doctrine\DBAL\Platforms\PostgreSQL91Platform::_keywords

Holds the KeywordList instance for the current platform.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::supportsColumnCollation () : bool

Does this platform support column collation?

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getReservedKeywordsClass () : string

Returns the class name of the reserved keywords list.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getColumnCollationDeclarationSQL ($collation) : string

Obtains DBMS specific SQL code portion needed to set the COLLATION
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getListTableColumnsSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::setUseBooleanTrueFalseStrings ($flag) : void

PostgreSQL has different behavior with some drivers
with regard to how booleans have to be handled.

Enables use of 'true'/'false' or otherwise 1 and 0 instead.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getSubstringExpression ($value, $from, $length = null) : string

Returns a SQL snippet to get a substring inside an SQL statement.

Note: Not SQL92, but common functionality.

SQLite only supports the 2 parameter variant of this function.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getNowExpression () : string

Returns the SQL snippet to get the current system date.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getRegexpExpression () : string

Returns the regular expression operator.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getLocateExpression ($str, $substr, $startPos = false) : string

Returns the SQL snippet to get the position of the first occurrence of substring $substr in string $str.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDateArithmeticIntervalExpression ($date, $operator, $interval, $unit) : string

Returns the SQL for a date arithmetic expression.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDateDiffExpression ($date1, $date2) : string

Returns the SQL to calculate the difference in days between the two passed dates.

Computes diff = date1 - date2.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::supportsSequences () : bool

Whether the platform supports sequences.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::supportsSchemas () : bool

Whether the platform supports database schemas.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDefaultSchemaName () : string

Returns the default schema name.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::supportsIdentityColumns () : bool

Whether the platform supports identity columns.

Identity columns are columns that receive an auto-generated value from the
database on insert of a row.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::supportsPartialIndexes () : bool

Whether the platform supports partial indexes.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::usesSequenceEmulatedIdentityColumns () : bool

Whether the platform emulates identity columns through sequences.

Some platforms that do not support identity columns natively
but support sequences can emulate identity columns by using
sequences.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getIdentitySequenceName ($tableName, $columnName) : string

Returns the name of the sequence for a particular identity column in a particular table.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::supportsCommentOnStatement () : bool

Whether this platform support the proprietary syntax "COMMENT ON asset".

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::prefersSequences () : bool

Whether the platform prefers sequences for ID generation.
Subclasses should override this method to return TRUE if they prefer sequences.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::hasNativeGuidType () : bool

Does this platform have native guid type.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getListDatabasesSQL () : string

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getListNamespacesSQL () : string

Returns the SQL statement for retrieving the namespaces defined in the database.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getListSequencesSQL ($database) : string

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getListTablesSQL () : string

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getListViewsSQL ($database) : string

Returns the SQL to list all views of a database or user.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getListTableForeignKeysSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getCreateViewSQL ($name, $sql) : string

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDropViewSQL ($name) : string

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getListTableConstraintsSQL ($table) : string

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getListTableIndexesSQL ($table, $currentDatabase = null) : string

Returns the list of indexes for the current database.

The current database parameter is optional but will always be passed
when using the SchemaManager API and is the database the given table is in.

Attention: Some platforms only support currentDatabase when they
are connected with that database. Cross-database information schema
requests may be impossible.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getCreateDatabaseSQL ($name) : string

Returns the SQL to create a new database.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDisallowDatabaseConnectionsSQL ($database) : string

Returns the SQL statement for disallowing new connections on the given database.

This is useful to force DROP DATABASE operations which could fail because of active connections.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getCloseActiveDatabaseConnectionsSQL ($database) : string

Returns the SQL statement for closing currently active connections on the given database.

This is useful to force DROP DATABASE operations which could fail because of active connections.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getAdvancedForeignKeyOptionsSQL ($foreignKey) : string

Returns the FOREIGN KEY query section dealing with non-standard options
as MATCH, INITIALLY DEFERRED, ON UPDATE, ...

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getAlterTableSQL ($diff) : string[]

Gets the SQL statements for altering an existing table.

This method returns an array of SQL statements, since some platforms need several statements.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getRenameIndexSQL ($oldIndexName, $index, $tableName) : string[]

Returns the SQL for renaming an index on a table.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getCommentOnColumnSQL ($tableName, $columnName, $comment) : string

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getCreateSequenceSQL ($sequence) : string

Returns the SQL to create a sequence on this platform.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getAlterSequenceSQL ($sequence) : string

Returns the SQL to change a sequence on this platform.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDropSequenceSQL ($sequence) : string

Returns the SQL snippet to drop an existing sequence.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getCreateSchemaSQL ($schemaName) : string

Returns the SQL to create a named schema.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDropForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to drop a foreign key.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::_getCreateTableSQL ($tableName, $columns, $options = []) : string[]

Returns the SQL used to create a table.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::convertBooleans ($item) : mixed

Some platforms need the boolean values to be converted.

The default conversion in this implementation converts to integers (false => 0, true => 1).

Note: if the input is not a boolean the original input might be returned.

There are two contexts when converting booleans: Literals and Prepared Statements.
This method should handle the literal case

Postgres wants boolean values converted to the strings 'true'/'false'.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::convertBooleansToDatabaseValue ($item) : mixed

This method should handle the prepared statements case. When there is no
distinction, it's OK to use the same method.

Note: if the input is not a boolean the original input might be returned.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::convertFromBoolean ($item) : boolnull

Some platforms have boolean literals that needs to be correctly converted

The default conversion tries to convert value into bool "(bool)$item"

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getSequenceNextValSQL ($sequenceName) : string

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getSetTransactionIsolationSQL ($level) : string

Returns the SQL to set the transaction isolation level.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getBooleanTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a boolean column.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getIntegerTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a 4 byte integer column.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getBigIntTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares an 8 byte integer column.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getSmallIntTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a 2 byte integer column.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getGuidTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a GUID/UUID field.

By default this maps directly to a CHAR(36) and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDateTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime fields in
statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDateTimeTzTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime with timezone offset fields.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDateTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create date fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create time fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getGuidExpression () : string

Returns the global unique identifier expression.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::_getCommonIntegerTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares common properties of an integer column.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getVarcharTypeDeclarationSQLSnippet ($length, $fixed) : string

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getBinaryTypeDeclarationSQLSnippet ($length, $fixed) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getClobTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a CLOB column type.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getName () : string

Gets the name of the platform.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getSQLResultCasing ($column) : string

Gets the character casing of a column in an SQL result set of this platform.

PostgreSQL returns all column names in SQL result sets in lowercase.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDateTimeTzFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime with timezone value of this platform.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getEmptyIdentityInsertSQL ($quotedTableName, $quotedIdentifierColumnName) : string

Returns the insert SQL for an empty insert statement.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getTruncateTableSQL ($tableName, $cascade = false) : string

Generates a Truncate Table SQL statement for a given table.

Cascade is not supported on many platforms but would optionally cascade the truncate by
following the foreign keys.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getReadLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which locks rows in shared read lock.

This defaults to the ANSI SQL "FOR UPDATE", which is an exclusive lock (Write). Some database
vendors allow to lighten this constraint up to be a real read lock.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::initializeDoctrineTypeMappings () : void

Lazy load Doctrine Type Mappings.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getVarcharMaxLength () : int

Gets the maximum length of a varchar field.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getBinaryMaxLength () : int

Gets the maximum length of a binary field.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getBinaryDefaultLength () : int

Gets the default length of a binary field.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getBlobTypeDeclarationSQL ($field) : string

Returns the SQL Snippet used to declare a BLOB column type.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDefaultValueDeclarationSQL ($field) : string

Obtains DBMS specific SQL code portion needed to set a default value
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getListTableMetadataSQL ($table, $schema = null) : string

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::__construct () : void

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::setEventManager ($eventManager) : void

Sets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getEventManager () : Doctrine\Common\EventManager

Gets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getVarcharTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a VARCHAR column type.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getBinaryTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getJsonTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a JSON field.

By default this maps directly to a CLOB and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::registerDoctrineTypeMapping ($dbType, $doctrineType) : void

Registers a doctrine type to be used in conjunction with a column type of this platform.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDoctrineTypeMapping ($dbType) : string

Gets the Doctrine type that is mapped for the given database column type.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::hasDoctrineTypeMappingFor ($dbType) : bool

Checks if a database type is currently supported by this platform.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::initializeCommentedDoctrineTypes () : void

Initializes the Doctrine Type comments instance variable for in_array() checks.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::isCommentedDoctrineType ($doctrineType) : bool

Is it necessary for the platform to add a parsable type comment to allow reverse engineering the given type?

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::markDoctrineTypeCommented ($doctrineType) : void

Marks this type as to be commented in ALTER TABLE and CREATE TABLE statements.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDoctrineTypeComment ($doctrineType) : string

Gets the comment to append to a column comment that helps parsing this type in reverse engineering.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getColumnComment ($column) : stringnull

Gets the comment of a passed column modified by potential doctrine type comment hints.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getIdentifierQuoteCharacter () : string

Gets the character used for identifier quoting.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getSqlCommentStartString () : string

Gets the string portion that starts an SQL comment.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getSqlCommentEndString () : string

Gets the string portion that ends an SQL comment.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getCharMaxLength () : int

Gets the maximum length of a char field.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getVarcharDefaultLength () : int

Gets the default length of a varchar field.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getWildcards () : string[]

Gets all SQL wildcard characters of the platform.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getAvgExpression ($column) : string

Returns the SQL snippet to get the average value of a column.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getCountExpression ($column) : string

Returns the SQL snippet to get the number of rows (without a NULL value) of a column.

If a '*' is used instead of a column the number of selected rows is returned.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getMaxExpression ($column) : string

Returns the SQL snippet to get the highest value of a column.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getMinExpression ($column) : string

Returns the SQL snippet to get the lowest value of a column.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getSumExpression ($column) : string

Returns the SQL snippet to get the total sum of a column.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getMd5Expression ($column) : string

Returns the SQL snippet to get the md5 sum of a field.

Note: Not SQL92, but common functionality.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getLengthExpression ($column) : string

Returns the SQL snippet to get the length of a text field.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getSqrtExpression ($column) : string

Returns the SQL snippet to get the squared value of a column.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getRoundExpression ($column, $decimals = 0) : string

Returns the SQL snippet to round a numeric field to the number of decimals specified.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getModExpression ($expression1, $expression2) : string

Returns the SQL snippet to get the remainder of the division operation $expression1 / $expression2.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getTrimExpression ($str, $mode = Doctrine\DBAL\Platforms\TrimMode::UNSPECIFIED, $char = false) : string

Returns the SQL snippet to trim a string.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getRtrimExpression ($str) : string

Returns the SQL snippet to trim trailing space characters from the expression.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getLtrimExpression ($str) : string

Returns the SQL snippet to trim leading space characters from the expression.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getUpperExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to uppercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getLowerExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to lowercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getConcatExpression () : string

Returns a SQL snippet to concatenate the given expressions.

Accepts an arbitrary number of string parameters. Each parameter must contain an expression.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getNotExpression ($expression) : string

Returns the SQL for a logical not.

Example:

$q = new Doctrine_Query();
$e = $q->expr;
$q->select('*')->from('table')
->where($e->eq('id', $e->not('null'));

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getIsNullExpression ($expression) : string

Returns the SQL that checks if an expression is null.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getIsNotNullExpression ($expression) : string

Returns the SQL that checks if an expression is not null.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getBetweenExpression ($expression, $value1, $value2) : string

Returns the SQL that checks if an expression evaluates to a value between two values.

The parameter $expression is checked if it is between $value1 and $value2.

Note: There is a slight difference in the way BETWEEN works on some databases.
http://www.w3schools.com/sql/sql_between.asp. If you want complete database
independence you should avoid using between().

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getAcosExpression ($value) : string

Returns the SQL to get the arccosine of a value.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getSinExpression ($value) : string

Returns the SQL to get the sine of a value.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getPiExpression () : string

Returns the SQL to get the PI value.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getCosExpression ($value) : string

Returns the SQL to get the cosine of a value.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDateAddSecondsExpression ($date, $seconds) : string

Returns the SQL to add the number of given seconds to a date.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDateSubSecondsExpression ($date, $seconds) : string

Returns the SQL to subtract the number of given seconds from a date.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDateAddMinutesExpression ($date, $minutes) : string

Returns the SQL to add the number of given minutes to a date.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDateSubMinutesExpression ($date, $minutes) : string

Returns the SQL to subtract the number of given minutes from a date.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDateAddHourExpression ($date, $hours) : string

Returns the SQL to add the number of given hours to a date.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDateSubHourExpression ($date, $hours) : string

Returns the SQL to subtract the number of given hours to a date.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDateAddDaysExpression ($date, $days) : string

Returns the SQL to add the number of given days to a date.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDateSubDaysExpression ($date, $days) : string

Returns the SQL to subtract the number of given days to a date.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDateAddWeeksExpression ($date, $weeks) : string

Returns the SQL to add the number of given weeks to a date.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDateSubWeeksExpression ($date, $weeks) : string

Returns the SQL to subtract the number of given weeks from a date.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDateAddMonthExpression ($date, $months) : string

Returns the SQL to add the number of given months to a date.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDateSubMonthExpression ($date, $months) : string

Returns the SQL to subtract the number of given months to a date.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDateAddQuartersExpression ($date, $quarters) : string

Returns the SQL to add the number of given quarters to a date.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDateSubQuartersExpression ($date, $quarters) : string

Returns the SQL to subtract the number of given quarters from a date.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDateAddYearsExpression ($date, $years) : string

Returns the SQL to add the number of given years to a date.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDateSubYearsExpression ($date, $years) : string

Returns the SQL to subtract the number of given years from a date.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getBitAndComparisonExpression ($value1, $value2) : string

Returns the SQL bit AND comparison expression.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getBitOrComparisonExpression ($value1, $value2) : string

Returns the SQL bit OR comparison expression.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getForUpdateSQL () : string

Returns the FOR UPDATE expression.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::appendLockHint ($fromClause, $lockMode) : string

Honors that some SQL vendors such as MsSql use table hints for locking instead of the ANSI SQL FOR UPDATE specification.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getWriteLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which obtains an exclusive lock on the rows.

The semantics of this lock mode should equal the SELECT .. FOR UPDATE of the ANSI SQL standard.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDropDatabaseSQL ($database) : string

Returns the SQL snippet to drop an existing database.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDropTableSQL ($table) : string

Returns the SQL snippet to drop an existing table.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDropTemporaryTableSQL ($table) : string

Returns the SQL to safely drop a temporary table WITHOUT implicitly committing an open transaction.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDropIndexSQL ($index, $table = null) : string

Returns the SQL to drop an index from a table.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDropConstraintSQL ($constraint, $table) : string

Returns the SQL to drop a constraint.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getCreateTableSQL ($table, $createFlags = self::CREATE_INDEXES) : string[]

Returns the SQL statement(s) to create a table with the specified name, columns and constraints
on this platform.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getCommentOnTableSQL ($tableName, $comment) : string

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getInlineColumnCommentSQL ($comment) : string

Returns the SQL to create inline comment on a column.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getCreateTemporaryTableSnippetSQL () : string

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getCreateConstraintSQL ($constraint, $table) : string

Returns the SQL to create a constraint on a table on this platform.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getCreateIndexSQL ($index, $table) : string

Returns the SQL to create an index on a table on this platform.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getPartialIndexSQL ($index) : string

Adds condition for partial index.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getCreateIndexSQLFlags ($index) : string

Adds additional flags for index generation.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getCreatePrimaryKeySQL ($index, $table) : string

Returns the SQL to create an unnamed primary key constraint.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::quoteIdentifier ($str) : string

Quotes a string so that it can be safely used as a table or column name,
even if it is a reserved word of the platform. This also detects identifier
chains separated by dot and quotes them independently.

NOTE: Just because you CAN use quoted identifiers doesn't mean
you SHOULD use them. In general, they end up causing way more
problems than they solve.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::quoteSingleIdentifier ($str) : string

Quotes a single identifier (no dot chain separation).

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getCreateForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to create a new foreign key.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::onSchemaAlterTableAddColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::onSchemaAlterTableRemoveColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::onSchemaAlterTableChangeColumn ($columnDiff, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::onSchemaAlterTableRenameColumn ($oldColumnName, $column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::onSchemaAlterTable ($diff, &$sql) : bool

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getPreAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getPostAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::_getAlterTableIndexForeignKeySQL ($diff) : string[]

Common code for alter table statement generation that updates the changed Index and Foreign Key definitions.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getColumnDeclarationListSQL ($fields) : string

Gets declaration of a number of fields in bulk.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getColumnDeclarationSQL ($name, $field) : string

Obtains DBMS specific SQL code portion needed to declare a generic type
field to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDecimalTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a floating point column of arbitrary precision.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getCheckDeclarationSQL ($definition) : string

Obtains DBMS specific SQL code portion needed to set a CHECK constraint
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getUniqueConstraintDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set a unique
constraint declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getIndexDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getCustomTypeDeclarationSQL ($columnDef) : string

Obtains SQL code portion needed to create a custom column,
e.g. when a field has the "columnDefinition" keyword.
Only "AUTOINCREMENT" and "PRIMARY KEY" are added if appropriate.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getIndexFieldDeclarationListSQL ($columnsOrIndex) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getTemporaryTableSQL () : string

Returns the required SQL string that fits between CREATE ... TABLE
to create the table as a temporary table.

Should be overridden in driver classes to return the correct string for the
specific database type.

The default is to return the string "TEMPORARY" - this will result in a
SQL error for any database that does not support temporary tables, or that
requires a different SQL command from "CREATE TEMPORARY TABLE".

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getTemporaryTableName ($tableName) : string

Some vendors require temporary table names to be qualified specially.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getForeignKeyDeclarationSQL ($foreignKey) : string

Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getForeignKeyReferentialActionSQL ($action) : string

Returns the given referential action in uppercase if valid, otherwise throws an exception.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getForeignKeyBaseDeclarationSQL ($foreignKey) : string

Obtains DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getUniqueFieldDeclarationSQL () : string

Obtains DBMS specific SQL code portion needed to set the UNIQUE constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getColumnCharsetDeclarationSQL ($charset) : string

Obtains DBMS specific SQL code portion needed to set the CHARACTER SET
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::prefersIdentityColumns () : bool

Whether the platform prefers identity columns (eg. autoincrement) for ID generation.
Subclasses should override this method to return TRUE if they prefer identity columns.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getCurrentDateSQL () : string

Returns the SQL specific for the platform to get the current date.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getCurrentTimeSQL () : string

Returns the SQL specific for the platform to get the current time.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getCurrentTimestampSQL () : string

Returns the SQL specific for the platform to get the current timestamp

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::_getTransactionIsolationLevelSQL ($level) : string

Returns the SQL for a given transaction isolation level Connection constant.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getListUsersSQL () : string

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getFloatDeclarationSQL ($fieldDeclaration) : string

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDefaultTransactionIsolationLevel () : int

Gets the default transaction isolation level of the platform.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::supportsIndexes () : bool

Whether the platform supports indexes.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::supportsColumnLengthIndexes () : bool

Whether the platform supports indexes with column length definitions.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::supportsAlterTable () : bool

Whether the platform supports altering tables.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::supportsTransactions () : bool

Whether the platform supports transactions.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::supportsSavepoints () : bool

Whether the platform supports savepoints.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::supportsReleaseSavepoints () : bool

Whether the platform supports releasing savepoints.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::supportsPrimaryConstraints () : bool

Whether the platform supports primary key constraints.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::supportsForeignKeyConstraints () : bool

Whether the platform supports foreign key constraints.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::supportsForeignKeyOnUpdate () : bool

Whether this platform supports onUpdate in foreign key constraints.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::canEmulateSchemas () : bool

Whether this platform can emulate schemas.

Platforms that either support or emulate schemas don't automatically
filter a schema for the namespaced elements in {@link
AbstractManager#createSchema}.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::supportsCreateDropDatabase () : bool

Whether this platform supports create database.

Some databases don't allow to create and drop databases at all or only with certain tools.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::supportsGettingAffectedRows () : bool

Whether the platform supports getting the affected rows of a recent update/delete type query.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::supportsInlineColumnComments () : bool

Whether this platform support to add inline column comments as postfix.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::hasNativeJsonType () : bool

Does this platform have native JSON type.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getIdentityColumnNullInsertSQL () : void

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::supportsViews () : bool

Whether this platform supports views.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDateTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime value of this platform.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDateFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored date value of this platform.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored time value of this platform.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::modifyLimitQuery ($query, $limit, $offset = null) : string

Adds an driver-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::doModifyLimitQuery ($query, $limit, $offset) : string

Adds an platform-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::supportsLimitOffset () : bool

Whether the database platform support offsets in modify limit clauses.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::fixSchemaElementName ($schemaElementName) : string

Makes any fixes to a name of a schema element (table, sequence, ...) that are required
by restrictions of the platform, like a maximum length.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getMaxIdentifierLength () : int

Maximum length of any given database identifier, like tables or column names.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getDummySelectSQL () : string

This is for test reasons, many vendors have special requirements for dummy statements.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::createSavePoint ($savepoint) : string

Returns the SQL to create a new savepoint.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::releaseSavePoint ($savepoint) : string

Returns the SQL to release a savepoint.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::rollbackSavePoint ($savepoint) : string

Returns the SQL to rollback a savepoint.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getReservedKeywordsList () : Doctrine\DBAL\Platforms\Keywords\KeywordList

Returns the keyword list instance of this platform.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::quoteStringLiteral ($str) : string

Quotes a literal string.
This method is NOT meant to fix SQL injections!
It is only meant to escape this platform's string literal
quote character inside the given literal string.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getStringLiteralQuoteCharacter () : string

Gets the character used for string literal quoting.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::escapeStringForLike ($inputString, $escapeChar) : string

Escapes metacharacters in a string intended to be used with a LIKE
operator.

method Doctrine\DBAL\Platforms\PostgreSQL91Platform::getLikeWildcardCharacters () : string

class Doctrine\DBAL\Platforms::PostgreSQL92Platform

Provides the behavior, features and SQL dialect of the PostgreSQL 9.2 database platform.

classconstant integer Doctrine\DBAL\Platforms\PostgreSQL92Platform::CREATE_INDEXES

classconstant integer Doctrine\DBAL\Platforms\PostgreSQL92Platform::CREATE_FOREIGNKEYS

classconstant string Doctrine\DBAL\Platforms\PostgreSQL92Platform::DATE_INTERVAL_UNIT_SECOND

classconstant string Doctrine\DBAL\Platforms\PostgreSQL92Platform::DATE_INTERVAL_UNIT_MINUTE

classconstant string Doctrine\DBAL\Platforms\PostgreSQL92Platform::DATE_INTERVAL_UNIT_HOUR

classconstant string Doctrine\DBAL\Platforms\PostgreSQL92Platform::DATE_INTERVAL_UNIT_DAY

classconstant string Doctrine\DBAL\Platforms\PostgreSQL92Platform::DATE_INTERVAL_UNIT_WEEK

classconstant string Doctrine\DBAL\Platforms\PostgreSQL92Platform::DATE_INTERVAL_UNIT_MONTH

classconstant string Doctrine\DBAL\Platforms\PostgreSQL92Platform::DATE_INTERVAL_UNIT_QUARTER

classconstant string Doctrine\DBAL\Platforms\PostgreSQL92Platform::DATE_INTERVAL_UNIT_YEAR

classconstant integer Doctrine\DBAL\Platforms\PostgreSQL92Platform::TRIM_UNSPECIFIED

classconstant integer Doctrine\DBAL\Platforms\PostgreSQL92Platform::TRIM_LEADING

classconstant integer Doctrine\DBAL\Platforms\PostgreSQL92Platform::TRIM_TRAILING

classconstant integer Doctrine\DBAL\Platforms\PostgreSQL92Platform::TRIM_BOTH

property string[]null Doctrine\DBAL\Platforms\PostgreSQL92Platform::doctrineTypeMapping

property string[]null Doctrine\DBAL\Platforms\PostgreSQL92Platform::doctrineTypeComments

Contains a list of all columns that should generate parseable column comments for type-detection
in reverse engineering scenarios.

property Doctrine\Common\EventManager Doctrine\DBAL\Platforms\PostgreSQL92Platform::_eventManager

property Doctrine\DBAL\Platforms\Keywords\KeywordListnull Doctrine\DBAL\Platforms\PostgreSQL92Platform::_keywords

Holds the KeywordList instance for the current platform.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getJsonTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a JSON field.

By default this maps directly to a CLOB and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getSmallIntTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a 2 byte integer column.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::hasNativeJsonType () : bool

Does this platform have native JSON type.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getReservedKeywordsClass () : string

Returns the class name of the reserved keywords list.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::initializeDoctrineTypeMappings () : void

Lazy load Doctrine Type Mappings.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getCloseActiveDatabaseConnectionsSQL ($database) : string

Returns the SQL statement for closing currently active connections on the given database.

This is useful to force DROP DATABASE operations which could fail because of active connections.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::supportsColumnCollation () : bool

Does this platform support column collation?

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getColumnCollationDeclarationSQL ($collation) : string

Obtains DBMS specific SQL code portion needed to set the COLLATION
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getListTableColumnsSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::setUseBooleanTrueFalseStrings ($flag) : void

PostgreSQL has different behavior with some drivers
with regard to how booleans have to be handled.

Enables use of 'true'/'false' or otherwise 1 and 0 instead.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getSubstringExpression ($value, $from, $length = null) : string

Returns a SQL snippet to get a substring inside an SQL statement.

Note: Not SQL92, but common functionality.

SQLite only supports the 2 parameter variant of this function.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getNowExpression () : string

Returns the SQL snippet to get the current system date.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getRegexpExpression () : string

Returns the regular expression operator.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getLocateExpression ($str, $substr, $startPos = false) : string

Returns the SQL snippet to get the position of the first occurrence of substring $substr in string $str.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDateArithmeticIntervalExpression ($date, $operator, $interval, $unit) : string

Returns the SQL for a date arithmetic expression.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDateDiffExpression ($date1, $date2) : string

Returns the SQL to calculate the difference in days between the two passed dates.

Computes diff = date1 - date2.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::supportsSequences () : bool

Whether the platform supports sequences.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::supportsSchemas () : bool

Whether the platform supports database schemas.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDefaultSchemaName () : string

Returns the default schema name.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::supportsIdentityColumns () : bool

Whether the platform supports identity columns.

Identity columns are columns that receive an auto-generated value from the
database on insert of a row.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::supportsPartialIndexes () : bool

Whether the platform supports partial indexes.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::usesSequenceEmulatedIdentityColumns () : bool

Whether the platform emulates identity columns through sequences.

Some platforms that do not support identity columns natively
but support sequences can emulate identity columns by using
sequences.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getIdentitySequenceName ($tableName, $columnName) : string

Returns the name of the sequence for a particular identity column in a particular table.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::supportsCommentOnStatement () : bool

Whether this platform support the proprietary syntax "COMMENT ON asset".

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::prefersSequences () : bool

Whether the platform prefers sequences for ID generation.
Subclasses should override this method to return TRUE if they prefer sequences.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::hasNativeGuidType () : bool

Does this platform have native guid type.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getListDatabasesSQL () : string

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getListNamespacesSQL () : string

Returns the SQL statement for retrieving the namespaces defined in the database.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getListSequencesSQL ($database) : string

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getListTablesSQL () : string

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getListViewsSQL ($database) : string

Returns the SQL to list all views of a database or user.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getListTableForeignKeysSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getCreateViewSQL ($name, $sql) : string

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDropViewSQL ($name) : string

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getListTableConstraintsSQL ($table) : string

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getListTableIndexesSQL ($table, $currentDatabase = null) : string

Returns the list of indexes for the current database.

The current database parameter is optional but will always be passed
when using the SchemaManager API and is the database the given table is in.

Attention: Some platforms only support currentDatabase when they
are connected with that database. Cross-database information schema
requests may be impossible.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getCreateDatabaseSQL ($name) : string

Returns the SQL to create a new database.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDisallowDatabaseConnectionsSQL ($database) : string

Returns the SQL statement for disallowing new connections on the given database.

This is useful to force DROP DATABASE operations which could fail because of active connections.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getAdvancedForeignKeyOptionsSQL ($foreignKey) : string

Returns the FOREIGN KEY query section dealing with non-standard options
as MATCH, INITIALLY DEFERRED, ON UPDATE, ...

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getAlterTableSQL ($diff) : string[]

Gets the SQL statements for altering an existing table.

This method returns an array of SQL statements, since some platforms need several statements.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getRenameIndexSQL ($oldIndexName, $index, $tableName) : string[]

Returns the SQL for renaming an index on a table.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getCommentOnColumnSQL ($tableName, $columnName, $comment) : string

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getCreateSequenceSQL ($sequence) : string

Returns the SQL to create a sequence on this platform.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getAlterSequenceSQL ($sequence) : string

Returns the SQL to change a sequence on this platform.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDropSequenceSQL ($sequence) : string

Returns the SQL snippet to drop an existing sequence.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getCreateSchemaSQL ($schemaName) : string

Returns the SQL to create a named schema.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDropForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to drop a foreign key.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::_getCreateTableSQL ($tableName, $columns, $options = []) : string[]

Returns the SQL used to create a table.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::convertBooleans ($item) : mixed

Some platforms need the boolean values to be converted.

The default conversion in this implementation converts to integers (false => 0, true => 1).

Note: if the input is not a boolean the original input might be returned.

There are two contexts when converting booleans: Literals and Prepared Statements.
This method should handle the literal case

Postgres wants boolean values converted to the strings 'true'/'false'.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::convertBooleansToDatabaseValue ($item) : mixed

This method should handle the prepared statements case. When there is no
distinction, it's OK to use the same method.

Note: if the input is not a boolean the original input might be returned.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::convertFromBoolean ($item) : boolnull

Some platforms have boolean literals that needs to be correctly converted

The default conversion tries to convert value into bool "(bool)$item"

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getSequenceNextValSQL ($sequenceName) : string

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getSetTransactionIsolationSQL ($level) : string

Returns the SQL to set the transaction isolation level.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getBooleanTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a boolean column.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getIntegerTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a 4 byte integer column.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getBigIntTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares an 8 byte integer column.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getGuidTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a GUID/UUID field.

By default this maps directly to a CHAR(36) and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDateTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime fields in
statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDateTimeTzTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime with timezone offset fields.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDateTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create date fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create time fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getGuidExpression () : string

Returns the global unique identifier expression.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::_getCommonIntegerTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares common properties of an integer column.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getVarcharTypeDeclarationSQLSnippet ($length, $fixed) : string

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getBinaryTypeDeclarationSQLSnippet ($length, $fixed) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getClobTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a CLOB column type.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getName () : string

Gets the name of the platform.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getSQLResultCasing ($column) : string

Gets the character casing of a column in an SQL result set of this platform.

PostgreSQL returns all column names in SQL result sets in lowercase.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDateTimeTzFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime with timezone value of this platform.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getEmptyIdentityInsertSQL ($quotedTableName, $quotedIdentifierColumnName) : string

Returns the insert SQL for an empty insert statement.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getTruncateTableSQL ($tableName, $cascade = false) : string

Generates a Truncate Table SQL statement for a given table.

Cascade is not supported on many platforms but would optionally cascade the truncate by
following the foreign keys.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getReadLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which locks rows in shared read lock.

This defaults to the ANSI SQL "FOR UPDATE", which is an exclusive lock (Write). Some database
vendors allow to lighten this constraint up to be a real read lock.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getVarcharMaxLength () : int

Gets the maximum length of a varchar field.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getBinaryMaxLength () : int

Gets the maximum length of a binary field.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getBinaryDefaultLength () : int

Gets the default length of a binary field.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getBlobTypeDeclarationSQL ($field) : string

Returns the SQL Snippet used to declare a BLOB column type.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDefaultValueDeclarationSQL ($field) : string

Obtains DBMS specific SQL code portion needed to set a default value
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getListTableMetadataSQL ($table, $schema = null) : string

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::__construct () : void

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::setEventManager ($eventManager) : void

Sets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getEventManager () : Doctrine\Common\EventManager

Gets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getVarcharTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a VARCHAR column type.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getBinaryTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::registerDoctrineTypeMapping ($dbType, $doctrineType) : void

Registers a doctrine type to be used in conjunction with a column type of this platform.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDoctrineTypeMapping ($dbType) : string

Gets the Doctrine type that is mapped for the given database column type.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::hasDoctrineTypeMappingFor ($dbType) : bool

Checks if a database type is currently supported by this platform.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::initializeCommentedDoctrineTypes () : void

Initializes the Doctrine Type comments instance variable for in_array() checks.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::isCommentedDoctrineType ($doctrineType) : bool

Is it necessary for the platform to add a parsable type comment to allow reverse engineering the given type?

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::markDoctrineTypeCommented ($doctrineType) : void

Marks this type as to be commented in ALTER TABLE and CREATE TABLE statements.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDoctrineTypeComment ($doctrineType) : string

Gets the comment to append to a column comment that helps parsing this type in reverse engineering.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getColumnComment ($column) : stringnull

Gets the comment of a passed column modified by potential doctrine type comment hints.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getIdentifierQuoteCharacter () : string

Gets the character used for identifier quoting.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getSqlCommentStartString () : string

Gets the string portion that starts an SQL comment.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getSqlCommentEndString () : string

Gets the string portion that ends an SQL comment.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getCharMaxLength () : int

Gets the maximum length of a char field.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getVarcharDefaultLength () : int

Gets the default length of a varchar field.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getWildcards () : string[]

Gets all SQL wildcard characters of the platform.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getAvgExpression ($column) : string

Returns the SQL snippet to get the average value of a column.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getCountExpression ($column) : string

Returns the SQL snippet to get the number of rows (without a NULL value) of a column.

If a '*' is used instead of a column the number of selected rows is returned.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getMaxExpression ($column) : string

Returns the SQL snippet to get the highest value of a column.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getMinExpression ($column) : string

Returns the SQL snippet to get the lowest value of a column.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getSumExpression ($column) : string

Returns the SQL snippet to get the total sum of a column.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getMd5Expression ($column) : string

Returns the SQL snippet to get the md5 sum of a field.

Note: Not SQL92, but common functionality.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getLengthExpression ($column) : string

Returns the SQL snippet to get the length of a text field.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getSqrtExpression ($column) : string

Returns the SQL snippet to get the squared value of a column.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getRoundExpression ($column, $decimals = 0) : string

Returns the SQL snippet to round a numeric field to the number of decimals specified.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getModExpression ($expression1, $expression2) : string

Returns the SQL snippet to get the remainder of the division operation $expression1 / $expression2.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getTrimExpression ($str, $mode = Doctrine\DBAL\Platforms\TrimMode::UNSPECIFIED, $char = false) : string

Returns the SQL snippet to trim a string.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getRtrimExpression ($str) : string

Returns the SQL snippet to trim trailing space characters from the expression.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getLtrimExpression ($str) : string

Returns the SQL snippet to trim leading space characters from the expression.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getUpperExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to uppercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getLowerExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to lowercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getConcatExpression () : string

Returns a SQL snippet to concatenate the given expressions.

Accepts an arbitrary number of string parameters. Each parameter must contain an expression.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getNotExpression ($expression) : string

Returns the SQL for a logical not.

Example:

$q = new Doctrine_Query();
$e = $q->expr;
$q->select('*')->from('table')
->where($e->eq('id', $e->not('null'));

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getIsNullExpression ($expression) : string

Returns the SQL that checks if an expression is null.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getIsNotNullExpression ($expression) : string

Returns the SQL that checks if an expression is not null.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getBetweenExpression ($expression, $value1, $value2) : string

Returns the SQL that checks if an expression evaluates to a value between two values.

The parameter $expression is checked if it is between $value1 and $value2.

Note: There is a slight difference in the way BETWEEN works on some databases.
http://www.w3schools.com/sql/sql_between.asp. If you want complete database
independence you should avoid using between().

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getAcosExpression ($value) : string

Returns the SQL to get the arccosine of a value.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getSinExpression ($value) : string

Returns the SQL to get the sine of a value.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getPiExpression () : string

Returns the SQL to get the PI value.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getCosExpression ($value) : string

Returns the SQL to get the cosine of a value.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDateAddSecondsExpression ($date, $seconds) : string

Returns the SQL to add the number of given seconds to a date.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDateSubSecondsExpression ($date, $seconds) : string

Returns the SQL to subtract the number of given seconds from a date.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDateAddMinutesExpression ($date, $minutes) : string

Returns the SQL to add the number of given minutes to a date.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDateSubMinutesExpression ($date, $minutes) : string

Returns the SQL to subtract the number of given minutes from a date.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDateAddHourExpression ($date, $hours) : string

Returns the SQL to add the number of given hours to a date.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDateSubHourExpression ($date, $hours) : string

Returns the SQL to subtract the number of given hours to a date.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDateAddDaysExpression ($date, $days) : string

Returns the SQL to add the number of given days to a date.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDateSubDaysExpression ($date, $days) : string

Returns the SQL to subtract the number of given days to a date.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDateAddWeeksExpression ($date, $weeks) : string

Returns the SQL to add the number of given weeks to a date.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDateSubWeeksExpression ($date, $weeks) : string

Returns the SQL to subtract the number of given weeks from a date.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDateAddMonthExpression ($date, $months) : string

Returns the SQL to add the number of given months to a date.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDateSubMonthExpression ($date, $months) : string

Returns the SQL to subtract the number of given months to a date.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDateAddQuartersExpression ($date, $quarters) : string

Returns the SQL to add the number of given quarters to a date.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDateSubQuartersExpression ($date, $quarters) : string

Returns the SQL to subtract the number of given quarters from a date.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDateAddYearsExpression ($date, $years) : string

Returns the SQL to add the number of given years to a date.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDateSubYearsExpression ($date, $years) : string

Returns the SQL to subtract the number of given years from a date.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getBitAndComparisonExpression ($value1, $value2) : string

Returns the SQL bit AND comparison expression.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getBitOrComparisonExpression ($value1, $value2) : string

Returns the SQL bit OR comparison expression.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getForUpdateSQL () : string

Returns the FOR UPDATE expression.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::appendLockHint ($fromClause, $lockMode) : string

Honors that some SQL vendors such as MsSql use table hints for locking instead of the ANSI SQL FOR UPDATE specification.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getWriteLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which obtains an exclusive lock on the rows.

The semantics of this lock mode should equal the SELECT .. FOR UPDATE of the ANSI SQL standard.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDropDatabaseSQL ($database) : string

Returns the SQL snippet to drop an existing database.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDropTableSQL ($table) : string

Returns the SQL snippet to drop an existing table.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDropTemporaryTableSQL ($table) : string

Returns the SQL to safely drop a temporary table WITHOUT implicitly committing an open transaction.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDropIndexSQL ($index, $table = null) : string

Returns the SQL to drop an index from a table.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDropConstraintSQL ($constraint, $table) : string

Returns the SQL to drop a constraint.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getCreateTableSQL ($table, $createFlags = self::CREATE_INDEXES) : string[]

Returns the SQL statement(s) to create a table with the specified name, columns and constraints
on this platform.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getCommentOnTableSQL ($tableName, $comment) : string

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getInlineColumnCommentSQL ($comment) : string

Returns the SQL to create inline comment on a column.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getCreateTemporaryTableSnippetSQL () : string

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getCreateConstraintSQL ($constraint, $table) : string

Returns the SQL to create a constraint on a table on this platform.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getCreateIndexSQL ($index, $table) : string

Returns the SQL to create an index on a table on this platform.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getPartialIndexSQL ($index) : string

Adds condition for partial index.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getCreateIndexSQLFlags ($index) : string

Adds additional flags for index generation.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getCreatePrimaryKeySQL ($index, $table) : string

Returns the SQL to create an unnamed primary key constraint.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::quoteIdentifier ($str) : string

Quotes a string so that it can be safely used as a table or column name,
even if it is a reserved word of the platform. This also detects identifier
chains separated by dot and quotes them independently.

NOTE: Just because you CAN use quoted identifiers doesn't mean
you SHOULD use them. In general, they end up causing way more
problems than they solve.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::quoteSingleIdentifier ($str) : string

Quotes a single identifier (no dot chain separation).

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getCreateForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to create a new foreign key.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::onSchemaAlterTableAddColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::onSchemaAlterTableRemoveColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::onSchemaAlterTableChangeColumn ($columnDiff, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::onSchemaAlterTableRenameColumn ($oldColumnName, $column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::onSchemaAlterTable ($diff, &$sql) : bool

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getPreAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getPostAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::_getAlterTableIndexForeignKeySQL ($diff) : string[]

Common code for alter table statement generation that updates the changed Index and Foreign Key definitions.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getColumnDeclarationListSQL ($fields) : string

Gets declaration of a number of fields in bulk.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getColumnDeclarationSQL ($name, $field) : string

Obtains DBMS specific SQL code portion needed to declare a generic type
field to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDecimalTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a floating point column of arbitrary precision.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getCheckDeclarationSQL ($definition) : string

Obtains DBMS specific SQL code portion needed to set a CHECK constraint
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getUniqueConstraintDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set a unique
constraint declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getIndexDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getCustomTypeDeclarationSQL ($columnDef) : string

Obtains SQL code portion needed to create a custom column,
e.g. when a field has the "columnDefinition" keyword.
Only "AUTOINCREMENT" and "PRIMARY KEY" are added if appropriate.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getIndexFieldDeclarationListSQL ($columnsOrIndex) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getTemporaryTableSQL () : string

Returns the required SQL string that fits between CREATE ... TABLE
to create the table as a temporary table.

Should be overridden in driver classes to return the correct string for the
specific database type.

The default is to return the string "TEMPORARY" - this will result in a
SQL error for any database that does not support temporary tables, or that
requires a different SQL command from "CREATE TEMPORARY TABLE".

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getTemporaryTableName ($tableName) : string

Some vendors require temporary table names to be qualified specially.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getForeignKeyDeclarationSQL ($foreignKey) : string

Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getForeignKeyReferentialActionSQL ($action) : string

Returns the given referential action in uppercase if valid, otherwise throws an exception.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getForeignKeyBaseDeclarationSQL ($foreignKey) : string

Obtains DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getUniqueFieldDeclarationSQL () : string

Obtains DBMS specific SQL code portion needed to set the UNIQUE constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getColumnCharsetDeclarationSQL ($charset) : string

Obtains DBMS specific SQL code portion needed to set the CHARACTER SET
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::prefersIdentityColumns () : bool

Whether the platform prefers identity columns (eg. autoincrement) for ID generation.
Subclasses should override this method to return TRUE if they prefer identity columns.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getCurrentDateSQL () : string

Returns the SQL specific for the platform to get the current date.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getCurrentTimeSQL () : string

Returns the SQL specific for the platform to get the current time.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getCurrentTimestampSQL () : string

Returns the SQL specific for the platform to get the current timestamp

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::_getTransactionIsolationLevelSQL ($level) : string

Returns the SQL for a given transaction isolation level Connection constant.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getListUsersSQL () : string

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getFloatDeclarationSQL ($fieldDeclaration) : string

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDefaultTransactionIsolationLevel () : int

Gets the default transaction isolation level of the platform.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::supportsIndexes () : bool

Whether the platform supports indexes.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::supportsColumnLengthIndexes () : bool

Whether the platform supports indexes with column length definitions.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::supportsAlterTable () : bool

Whether the platform supports altering tables.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::supportsTransactions () : bool

Whether the platform supports transactions.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::supportsSavepoints () : bool

Whether the platform supports savepoints.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::supportsReleaseSavepoints () : bool

Whether the platform supports releasing savepoints.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::supportsPrimaryConstraints () : bool

Whether the platform supports primary key constraints.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::supportsForeignKeyConstraints () : bool

Whether the platform supports foreign key constraints.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::supportsForeignKeyOnUpdate () : bool

Whether this platform supports onUpdate in foreign key constraints.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::canEmulateSchemas () : bool

Whether this platform can emulate schemas.

Platforms that either support or emulate schemas don't automatically
filter a schema for the namespaced elements in {@link
AbstractManager#createSchema}.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::supportsCreateDropDatabase () : bool

Whether this platform supports create database.

Some databases don't allow to create and drop databases at all or only with certain tools.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::supportsGettingAffectedRows () : bool

Whether the platform supports getting the affected rows of a recent update/delete type query.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::supportsInlineColumnComments () : bool

Whether this platform support to add inline column comments as postfix.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getIdentityColumnNullInsertSQL () : void

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::supportsViews () : bool

Whether this platform supports views.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDateTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime value of this platform.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDateFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored date value of this platform.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored time value of this platform.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::modifyLimitQuery ($query, $limit, $offset = null) : string

Adds an driver-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::doModifyLimitQuery ($query, $limit, $offset) : string

Adds an platform-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::supportsLimitOffset () : bool

Whether the database platform support offsets in modify limit clauses.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::fixSchemaElementName ($schemaElementName) : string

Makes any fixes to a name of a schema element (table, sequence, ...) that are required
by restrictions of the platform, like a maximum length.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getMaxIdentifierLength () : int

Maximum length of any given database identifier, like tables or column names.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getDummySelectSQL () : string

This is for test reasons, many vendors have special requirements for dummy statements.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::createSavePoint ($savepoint) : string

Returns the SQL to create a new savepoint.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::releaseSavePoint ($savepoint) : string

Returns the SQL to release a savepoint.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::rollbackSavePoint ($savepoint) : string

Returns the SQL to rollback a savepoint.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getReservedKeywordsList () : Doctrine\DBAL\Platforms\Keywords\KeywordList

Returns the keyword list instance of this platform.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::quoteStringLiteral ($str) : string

Quotes a literal string.
This method is NOT meant to fix SQL injections!
It is only meant to escape this platform's string literal
quote character inside the given literal string.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getStringLiteralQuoteCharacter () : string

Gets the character used for string literal quoting.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::escapeStringForLike ($inputString, $escapeChar) : string

Escapes metacharacters in a string intended to be used with a LIKE
operator.

method Doctrine\DBAL\Platforms\PostgreSQL92Platform::getLikeWildcardCharacters () : string

class Doctrine\DBAL\Platforms::PostgreSQL94Platform

Provides the behavior, features and SQL dialect of the PostgreSQL 9.4 database platform.

classconstant integer Doctrine\DBAL\Platforms\PostgreSQL94Platform::CREATE_INDEXES

classconstant integer Doctrine\DBAL\Platforms\PostgreSQL94Platform::CREATE_FOREIGNKEYS

classconstant string Doctrine\DBAL\Platforms\PostgreSQL94Platform::DATE_INTERVAL_UNIT_SECOND

classconstant string Doctrine\DBAL\Platforms\PostgreSQL94Platform::DATE_INTERVAL_UNIT_MINUTE

classconstant string Doctrine\DBAL\Platforms\PostgreSQL94Platform::DATE_INTERVAL_UNIT_HOUR

classconstant string Doctrine\DBAL\Platforms\PostgreSQL94Platform::DATE_INTERVAL_UNIT_DAY

classconstant string Doctrine\DBAL\Platforms\PostgreSQL94Platform::DATE_INTERVAL_UNIT_WEEK

classconstant string Doctrine\DBAL\Platforms\PostgreSQL94Platform::DATE_INTERVAL_UNIT_MONTH

classconstant string Doctrine\DBAL\Platforms\PostgreSQL94Platform::DATE_INTERVAL_UNIT_QUARTER

classconstant string Doctrine\DBAL\Platforms\PostgreSQL94Platform::DATE_INTERVAL_UNIT_YEAR

classconstant integer Doctrine\DBAL\Platforms\PostgreSQL94Platform::TRIM_UNSPECIFIED

classconstant integer Doctrine\DBAL\Platforms\PostgreSQL94Platform::TRIM_LEADING

classconstant integer Doctrine\DBAL\Platforms\PostgreSQL94Platform::TRIM_TRAILING

classconstant integer Doctrine\DBAL\Platforms\PostgreSQL94Platform::TRIM_BOTH

property string[]null Doctrine\DBAL\Platforms\PostgreSQL94Platform::doctrineTypeMapping

property string[]null Doctrine\DBAL\Platforms\PostgreSQL94Platform::doctrineTypeComments

Contains a list of all columns that should generate parseable column comments for type-detection
in reverse engineering scenarios.

property Doctrine\Common\EventManager Doctrine\DBAL\Platforms\PostgreSQL94Platform::_eventManager

property Doctrine\DBAL\Platforms\Keywords\KeywordListnull Doctrine\DBAL\Platforms\PostgreSQL94Platform::_keywords

Holds the KeywordList instance for the current platform.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getJsonTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a JSON field.

By default this maps directly to a CLOB and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getReservedKeywordsClass () : string

Returns the class name of the reserved keywords list.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::initializeDoctrineTypeMappings () : void

Lazy load Doctrine Type Mappings.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getSmallIntTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a 2 byte integer column.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::hasNativeJsonType () : bool

Does this platform have native JSON type.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getCloseActiveDatabaseConnectionsSQL ($database) : string

Returns the SQL statement for closing currently active connections on the given database.

This is useful to force DROP DATABASE operations which could fail because of active connections.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::supportsColumnCollation () : bool

Does this platform support column collation?

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getColumnCollationDeclarationSQL ($collation) : string

Obtains DBMS specific SQL code portion needed to set the COLLATION
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getListTableColumnsSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::setUseBooleanTrueFalseStrings ($flag) : void

PostgreSQL has different behavior with some drivers
with regard to how booleans have to be handled.

Enables use of 'true'/'false' or otherwise 1 and 0 instead.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getSubstringExpression ($value, $from, $length = null) : string

Returns a SQL snippet to get a substring inside an SQL statement.

Note: Not SQL92, but common functionality.

SQLite only supports the 2 parameter variant of this function.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getNowExpression () : string

Returns the SQL snippet to get the current system date.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getRegexpExpression () : string

Returns the regular expression operator.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getLocateExpression ($str, $substr, $startPos = false) : string

Returns the SQL snippet to get the position of the first occurrence of substring $substr in string $str.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDateArithmeticIntervalExpression ($date, $operator, $interval, $unit) : string

Returns the SQL for a date arithmetic expression.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDateDiffExpression ($date1, $date2) : string

Returns the SQL to calculate the difference in days between the two passed dates.

Computes diff = date1 - date2.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::supportsSequences () : bool

Whether the platform supports sequences.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::supportsSchemas () : bool

Whether the platform supports database schemas.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDefaultSchemaName () : string

Returns the default schema name.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::supportsIdentityColumns () : bool

Whether the platform supports identity columns.

Identity columns are columns that receive an auto-generated value from the
database on insert of a row.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::supportsPartialIndexes () : bool

Whether the platform supports partial indexes.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::usesSequenceEmulatedIdentityColumns () : bool

Whether the platform emulates identity columns through sequences.

Some platforms that do not support identity columns natively
but support sequences can emulate identity columns by using
sequences.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getIdentitySequenceName ($tableName, $columnName) : string

Returns the name of the sequence for a particular identity column in a particular table.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::supportsCommentOnStatement () : bool

Whether this platform support the proprietary syntax "COMMENT ON asset".

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::prefersSequences () : bool

Whether the platform prefers sequences for ID generation.
Subclasses should override this method to return TRUE if they prefer sequences.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::hasNativeGuidType () : bool

Does this platform have native guid type.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getListDatabasesSQL () : string

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getListNamespacesSQL () : string

Returns the SQL statement for retrieving the namespaces defined in the database.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getListSequencesSQL ($database) : string

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getListTablesSQL () : string

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getListViewsSQL ($database) : string

Returns the SQL to list all views of a database or user.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getListTableForeignKeysSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getCreateViewSQL ($name, $sql) : string

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDropViewSQL ($name) : string

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getListTableConstraintsSQL ($table) : string

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getListTableIndexesSQL ($table, $currentDatabase = null) : string

Returns the list of indexes for the current database.

The current database parameter is optional but will always be passed
when using the SchemaManager API and is the database the given table is in.

Attention: Some platforms only support currentDatabase when they
are connected with that database. Cross-database information schema
requests may be impossible.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getCreateDatabaseSQL ($name) : string

Returns the SQL to create a new database.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDisallowDatabaseConnectionsSQL ($database) : string

Returns the SQL statement for disallowing new connections on the given database.

This is useful to force DROP DATABASE operations which could fail because of active connections.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getAdvancedForeignKeyOptionsSQL ($foreignKey) : string

Returns the FOREIGN KEY query section dealing with non-standard options
as MATCH, INITIALLY DEFERRED, ON UPDATE, ...

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getAlterTableSQL ($diff) : string[]

Gets the SQL statements for altering an existing table.

This method returns an array of SQL statements, since some platforms need several statements.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getRenameIndexSQL ($oldIndexName, $index, $tableName) : string[]

Returns the SQL for renaming an index on a table.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getCommentOnColumnSQL ($tableName, $columnName, $comment) : string

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getCreateSequenceSQL ($sequence) : string

Returns the SQL to create a sequence on this platform.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getAlterSequenceSQL ($sequence) : string

Returns the SQL to change a sequence on this platform.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDropSequenceSQL ($sequence) : string

Returns the SQL snippet to drop an existing sequence.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getCreateSchemaSQL ($schemaName) : string

Returns the SQL to create a named schema.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDropForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to drop a foreign key.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::_getCreateTableSQL ($tableName, $columns, $options = []) : string[]

Returns the SQL used to create a table.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::convertBooleans ($item) : mixed

Some platforms need the boolean values to be converted.

The default conversion in this implementation converts to integers (false => 0, true => 1).

Note: if the input is not a boolean the original input might be returned.

There are two contexts when converting booleans: Literals and Prepared Statements.
This method should handle the literal case

Postgres wants boolean values converted to the strings 'true'/'false'.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::convertBooleansToDatabaseValue ($item) : mixed

This method should handle the prepared statements case. When there is no
distinction, it's OK to use the same method.

Note: if the input is not a boolean the original input might be returned.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::convertFromBoolean ($item) : boolnull

Some platforms have boolean literals that needs to be correctly converted

The default conversion tries to convert value into bool "(bool)$item"

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getSequenceNextValSQL ($sequenceName) : string

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getSetTransactionIsolationSQL ($level) : string

Returns the SQL to set the transaction isolation level.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getBooleanTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a boolean column.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getIntegerTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a 4 byte integer column.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getBigIntTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares an 8 byte integer column.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getGuidTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a GUID/UUID field.

By default this maps directly to a CHAR(36) and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDateTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime fields in
statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDateTimeTzTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime with timezone offset fields.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDateTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create date fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create time fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getGuidExpression () : string

Returns the global unique identifier expression.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::_getCommonIntegerTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares common properties of an integer column.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getVarcharTypeDeclarationSQLSnippet ($length, $fixed) : string

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getBinaryTypeDeclarationSQLSnippet ($length, $fixed) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getClobTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a CLOB column type.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getName () : string

Gets the name of the platform.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getSQLResultCasing ($column) : string

Gets the character casing of a column in an SQL result set of this platform.

PostgreSQL returns all column names in SQL result sets in lowercase.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDateTimeTzFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime with timezone value of this platform.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getEmptyIdentityInsertSQL ($quotedTableName, $quotedIdentifierColumnName) : string

Returns the insert SQL for an empty insert statement.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getTruncateTableSQL ($tableName, $cascade = false) : string

Generates a Truncate Table SQL statement for a given table.

Cascade is not supported on many platforms but would optionally cascade the truncate by
following the foreign keys.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getReadLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which locks rows in shared read lock.

This defaults to the ANSI SQL "FOR UPDATE", which is an exclusive lock (Write). Some database
vendors allow to lighten this constraint up to be a real read lock.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getVarcharMaxLength () : int

Gets the maximum length of a varchar field.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getBinaryMaxLength () : int

Gets the maximum length of a binary field.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getBinaryDefaultLength () : int

Gets the default length of a binary field.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getBlobTypeDeclarationSQL ($field) : string

Returns the SQL Snippet used to declare a BLOB column type.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDefaultValueDeclarationSQL ($field) : string

Obtains DBMS specific SQL code portion needed to set a default value
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getListTableMetadataSQL ($table, $schema = null) : string

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::__construct () : void

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::setEventManager ($eventManager) : void

Sets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getEventManager () : Doctrine\Common\EventManager

Gets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getVarcharTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a VARCHAR column type.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getBinaryTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::registerDoctrineTypeMapping ($dbType, $doctrineType) : void

Registers a doctrine type to be used in conjunction with a column type of this platform.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDoctrineTypeMapping ($dbType) : string

Gets the Doctrine type that is mapped for the given database column type.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::hasDoctrineTypeMappingFor ($dbType) : bool

Checks if a database type is currently supported by this platform.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::initializeCommentedDoctrineTypes () : void

Initializes the Doctrine Type comments instance variable for in_array() checks.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::isCommentedDoctrineType ($doctrineType) : bool

Is it necessary for the platform to add a parsable type comment to allow reverse engineering the given type?

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::markDoctrineTypeCommented ($doctrineType) : void

Marks this type as to be commented in ALTER TABLE and CREATE TABLE statements.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDoctrineTypeComment ($doctrineType) : string

Gets the comment to append to a column comment that helps parsing this type in reverse engineering.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getColumnComment ($column) : stringnull

Gets the comment of a passed column modified by potential doctrine type comment hints.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getIdentifierQuoteCharacter () : string

Gets the character used for identifier quoting.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getSqlCommentStartString () : string

Gets the string portion that starts an SQL comment.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getSqlCommentEndString () : string

Gets the string portion that ends an SQL comment.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getCharMaxLength () : int

Gets the maximum length of a char field.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getVarcharDefaultLength () : int

Gets the default length of a varchar field.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getWildcards () : string[]

Gets all SQL wildcard characters of the platform.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getAvgExpression ($column) : string

Returns the SQL snippet to get the average value of a column.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getCountExpression ($column) : string

Returns the SQL snippet to get the number of rows (without a NULL value) of a column.

If a '*' is used instead of a column the number of selected rows is returned.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getMaxExpression ($column) : string

Returns the SQL snippet to get the highest value of a column.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getMinExpression ($column) : string

Returns the SQL snippet to get the lowest value of a column.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getSumExpression ($column) : string

Returns the SQL snippet to get the total sum of a column.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getMd5Expression ($column) : string

Returns the SQL snippet to get the md5 sum of a field.

Note: Not SQL92, but common functionality.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getLengthExpression ($column) : string

Returns the SQL snippet to get the length of a text field.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getSqrtExpression ($column) : string

Returns the SQL snippet to get the squared value of a column.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getRoundExpression ($column, $decimals = 0) : string

Returns the SQL snippet to round a numeric field to the number of decimals specified.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getModExpression ($expression1, $expression2) : string

Returns the SQL snippet to get the remainder of the division operation $expression1 / $expression2.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getTrimExpression ($str, $mode = Doctrine\DBAL\Platforms\TrimMode::UNSPECIFIED, $char = false) : string

Returns the SQL snippet to trim a string.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getRtrimExpression ($str) : string

Returns the SQL snippet to trim trailing space characters from the expression.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getLtrimExpression ($str) : string

Returns the SQL snippet to trim leading space characters from the expression.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getUpperExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to uppercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getLowerExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to lowercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getConcatExpression () : string

Returns a SQL snippet to concatenate the given expressions.

Accepts an arbitrary number of string parameters. Each parameter must contain an expression.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getNotExpression ($expression) : string

Returns the SQL for a logical not.

Example:

$q = new Doctrine_Query();
$e = $q->expr;
$q->select('*')->from('table')
->where($e->eq('id', $e->not('null'));

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getIsNullExpression ($expression) : string

Returns the SQL that checks if an expression is null.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getIsNotNullExpression ($expression) : string

Returns the SQL that checks if an expression is not null.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getBetweenExpression ($expression, $value1, $value2) : string

Returns the SQL that checks if an expression evaluates to a value between two values.

The parameter $expression is checked if it is between $value1 and $value2.

Note: There is a slight difference in the way BETWEEN works on some databases.
http://www.w3schools.com/sql/sql_between.asp. If you want complete database
independence you should avoid using between().

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getAcosExpression ($value) : string

Returns the SQL to get the arccosine of a value.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getSinExpression ($value) : string

Returns the SQL to get the sine of a value.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getPiExpression () : string

Returns the SQL to get the PI value.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getCosExpression ($value) : string

Returns the SQL to get the cosine of a value.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDateAddSecondsExpression ($date, $seconds) : string

Returns the SQL to add the number of given seconds to a date.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDateSubSecondsExpression ($date, $seconds) : string

Returns the SQL to subtract the number of given seconds from a date.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDateAddMinutesExpression ($date, $minutes) : string

Returns the SQL to add the number of given minutes to a date.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDateSubMinutesExpression ($date, $minutes) : string

Returns the SQL to subtract the number of given minutes from a date.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDateAddHourExpression ($date, $hours) : string

Returns the SQL to add the number of given hours to a date.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDateSubHourExpression ($date, $hours) : string

Returns the SQL to subtract the number of given hours to a date.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDateAddDaysExpression ($date, $days) : string

Returns the SQL to add the number of given days to a date.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDateSubDaysExpression ($date, $days) : string

Returns the SQL to subtract the number of given days to a date.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDateAddWeeksExpression ($date, $weeks) : string

Returns the SQL to add the number of given weeks to a date.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDateSubWeeksExpression ($date, $weeks) : string

Returns the SQL to subtract the number of given weeks from a date.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDateAddMonthExpression ($date, $months) : string

Returns the SQL to add the number of given months to a date.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDateSubMonthExpression ($date, $months) : string

Returns the SQL to subtract the number of given months to a date.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDateAddQuartersExpression ($date, $quarters) : string

Returns the SQL to add the number of given quarters to a date.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDateSubQuartersExpression ($date, $quarters) : string

Returns the SQL to subtract the number of given quarters from a date.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDateAddYearsExpression ($date, $years) : string

Returns the SQL to add the number of given years to a date.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDateSubYearsExpression ($date, $years) : string

Returns the SQL to subtract the number of given years from a date.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getBitAndComparisonExpression ($value1, $value2) : string

Returns the SQL bit AND comparison expression.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getBitOrComparisonExpression ($value1, $value2) : string

Returns the SQL bit OR comparison expression.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getForUpdateSQL () : string

Returns the FOR UPDATE expression.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::appendLockHint ($fromClause, $lockMode) : string

Honors that some SQL vendors such as MsSql use table hints for locking instead of the ANSI SQL FOR UPDATE specification.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getWriteLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which obtains an exclusive lock on the rows.

The semantics of this lock mode should equal the SELECT .. FOR UPDATE of the ANSI SQL standard.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDropDatabaseSQL ($database) : string

Returns the SQL snippet to drop an existing database.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDropTableSQL ($table) : string

Returns the SQL snippet to drop an existing table.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDropTemporaryTableSQL ($table) : string

Returns the SQL to safely drop a temporary table WITHOUT implicitly committing an open transaction.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDropIndexSQL ($index, $table = null) : string

Returns the SQL to drop an index from a table.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDropConstraintSQL ($constraint, $table) : string

Returns the SQL to drop a constraint.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getCreateTableSQL ($table, $createFlags = self::CREATE_INDEXES) : string[]

Returns the SQL statement(s) to create a table with the specified name, columns and constraints
on this platform.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getCommentOnTableSQL ($tableName, $comment) : string

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getInlineColumnCommentSQL ($comment) : string

Returns the SQL to create inline comment on a column.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getCreateTemporaryTableSnippetSQL () : string

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getCreateConstraintSQL ($constraint, $table) : string

Returns the SQL to create a constraint on a table on this platform.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getCreateIndexSQL ($index, $table) : string

Returns the SQL to create an index on a table on this platform.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getPartialIndexSQL ($index) : string

Adds condition for partial index.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getCreateIndexSQLFlags ($index) : string

Adds additional flags for index generation.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getCreatePrimaryKeySQL ($index, $table) : string

Returns the SQL to create an unnamed primary key constraint.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::quoteIdentifier ($str) : string

Quotes a string so that it can be safely used as a table or column name,
even if it is a reserved word of the platform. This also detects identifier
chains separated by dot and quotes them independently.

NOTE: Just because you CAN use quoted identifiers doesn't mean
you SHOULD use them. In general, they end up causing way more
problems than they solve.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::quoteSingleIdentifier ($str) : string

Quotes a single identifier (no dot chain separation).

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getCreateForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to create a new foreign key.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::onSchemaAlterTableAddColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::onSchemaAlterTableRemoveColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::onSchemaAlterTableChangeColumn ($columnDiff, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::onSchemaAlterTableRenameColumn ($oldColumnName, $column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::onSchemaAlterTable ($diff, &$sql) : bool

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getPreAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getPostAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::_getAlterTableIndexForeignKeySQL ($diff) : string[]

Common code for alter table statement generation that updates the changed Index and Foreign Key definitions.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getColumnDeclarationListSQL ($fields) : string

Gets declaration of a number of fields in bulk.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getColumnDeclarationSQL ($name, $field) : string

Obtains DBMS specific SQL code portion needed to declare a generic type
field to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDecimalTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a floating point column of arbitrary precision.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getCheckDeclarationSQL ($definition) : string

Obtains DBMS specific SQL code portion needed to set a CHECK constraint
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getUniqueConstraintDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set a unique
constraint declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getIndexDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getCustomTypeDeclarationSQL ($columnDef) : string

Obtains SQL code portion needed to create a custom column,
e.g. when a field has the "columnDefinition" keyword.
Only "AUTOINCREMENT" and "PRIMARY KEY" are added if appropriate.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getIndexFieldDeclarationListSQL ($columnsOrIndex) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getTemporaryTableSQL () : string

Returns the required SQL string that fits between CREATE ... TABLE
to create the table as a temporary table.

Should be overridden in driver classes to return the correct string for the
specific database type.

The default is to return the string "TEMPORARY" - this will result in a
SQL error for any database that does not support temporary tables, or that
requires a different SQL command from "CREATE TEMPORARY TABLE".

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getTemporaryTableName ($tableName) : string

Some vendors require temporary table names to be qualified specially.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getForeignKeyDeclarationSQL ($foreignKey) : string

Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getForeignKeyReferentialActionSQL ($action) : string

Returns the given referential action in uppercase if valid, otherwise throws an exception.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getForeignKeyBaseDeclarationSQL ($foreignKey) : string

Obtains DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getUniqueFieldDeclarationSQL () : string

Obtains DBMS specific SQL code portion needed to set the UNIQUE constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getColumnCharsetDeclarationSQL ($charset) : string

Obtains DBMS specific SQL code portion needed to set the CHARACTER SET
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::prefersIdentityColumns () : bool

Whether the platform prefers identity columns (eg. autoincrement) for ID generation.
Subclasses should override this method to return TRUE if they prefer identity columns.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getCurrentDateSQL () : string

Returns the SQL specific for the platform to get the current date.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getCurrentTimeSQL () : string

Returns the SQL specific for the platform to get the current time.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getCurrentTimestampSQL () : string

Returns the SQL specific for the platform to get the current timestamp

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::_getTransactionIsolationLevelSQL ($level) : string

Returns the SQL for a given transaction isolation level Connection constant.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getListUsersSQL () : string

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getFloatDeclarationSQL ($fieldDeclaration) : string

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDefaultTransactionIsolationLevel () : int

Gets the default transaction isolation level of the platform.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::supportsIndexes () : bool

Whether the platform supports indexes.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::supportsColumnLengthIndexes () : bool

Whether the platform supports indexes with column length definitions.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::supportsAlterTable () : bool

Whether the platform supports altering tables.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::supportsTransactions () : bool

Whether the platform supports transactions.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::supportsSavepoints () : bool

Whether the platform supports savepoints.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::supportsReleaseSavepoints () : bool

Whether the platform supports releasing savepoints.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::supportsPrimaryConstraints () : bool

Whether the platform supports primary key constraints.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::supportsForeignKeyConstraints () : bool

Whether the platform supports foreign key constraints.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::supportsForeignKeyOnUpdate () : bool

Whether this platform supports onUpdate in foreign key constraints.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::canEmulateSchemas () : bool

Whether this platform can emulate schemas.

Platforms that either support or emulate schemas don't automatically
filter a schema for the namespaced elements in {@link
AbstractManager#createSchema}.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::supportsCreateDropDatabase () : bool

Whether this platform supports create database.

Some databases don't allow to create and drop databases at all or only with certain tools.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::supportsGettingAffectedRows () : bool

Whether the platform supports getting the affected rows of a recent update/delete type query.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::supportsInlineColumnComments () : bool

Whether this platform support to add inline column comments as postfix.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getIdentityColumnNullInsertSQL () : void

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::supportsViews () : bool

Whether this platform supports views.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDateTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime value of this platform.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDateFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored date value of this platform.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored time value of this platform.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::modifyLimitQuery ($query, $limit, $offset = null) : string

Adds an driver-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::doModifyLimitQuery ($query, $limit, $offset) : string

Adds an platform-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::supportsLimitOffset () : bool

Whether the database platform support offsets in modify limit clauses.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::fixSchemaElementName ($schemaElementName) : string

Makes any fixes to a name of a schema element (table, sequence, ...) that are required
by restrictions of the platform, like a maximum length.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getMaxIdentifierLength () : int

Maximum length of any given database identifier, like tables or column names.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getDummySelectSQL () : string

This is for test reasons, many vendors have special requirements for dummy statements.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::createSavePoint ($savepoint) : string

Returns the SQL to create a new savepoint.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::releaseSavePoint ($savepoint) : string

Returns the SQL to release a savepoint.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::rollbackSavePoint ($savepoint) : string

Returns the SQL to rollback a savepoint.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getReservedKeywordsList () : Doctrine\DBAL\Platforms\Keywords\KeywordList

Returns the keyword list instance of this platform.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::quoteStringLiteral ($str) : string

Quotes a literal string.
This method is NOT meant to fix SQL injections!
It is only meant to escape this platform's string literal
quote character inside the given literal string.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getStringLiteralQuoteCharacter () : string

Gets the character used for string literal quoting.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::escapeStringForLike ($inputString, $escapeChar) : string

Escapes metacharacters in a string intended to be used with a LIKE
operator.

method Doctrine\DBAL\Platforms\PostgreSQL94Platform::getLikeWildcardCharacters () : string

class Doctrine\DBAL\Platforms::PostgreSQL100Platform

Provides the behavior, features and SQL dialect of the PostgreSQL 10.0 database platform.

classconstant integer Doctrine\DBAL\Platforms\PostgreSQL100Platform::CREATE_INDEXES

classconstant integer Doctrine\DBAL\Platforms\PostgreSQL100Platform::CREATE_FOREIGNKEYS

classconstant string Doctrine\DBAL\Platforms\PostgreSQL100Platform::DATE_INTERVAL_UNIT_SECOND

classconstant string Doctrine\DBAL\Platforms\PostgreSQL100Platform::DATE_INTERVAL_UNIT_MINUTE

classconstant string Doctrine\DBAL\Platforms\PostgreSQL100Platform::DATE_INTERVAL_UNIT_HOUR

classconstant string Doctrine\DBAL\Platforms\PostgreSQL100Platform::DATE_INTERVAL_UNIT_DAY

classconstant string Doctrine\DBAL\Platforms\PostgreSQL100Platform::DATE_INTERVAL_UNIT_WEEK

classconstant string Doctrine\DBAL\Platforms\PostgreSQL100Platform::DATE_INTERVAL_UNIT_MONTH

classconstant string Doctrine\DBAL\Platforms\PostgreSQL100Platform::DATE_INTERVAL_UNIT_QUARTER

classconstant string Doctrine\DBAL\Platforms\PostgreSQL100Platform::DATE_INTERVAL_UNIT_YEAR

classconstant integer Doctrine\DBAL\Platforms\PostgreSQL100Platform::TRIM_UNSPECIFIED

classconstant integer Doctrine\DBAL\Platforms\PostgreSQL100Platform::TRIM_LEADING

classconstant integer Doctrine\DBAL\Platforms\PostgreSQL100Platform::TRIM_TRAILING

classconstant integer Doctrine\DBAL\Platforms\PostgreSQL100Platform::TRIM_BOTH

property string[]null Doctrine\DBAL\Platforms\PostgreSQL100Platform::doctrineTypeMapping

property string[]null Doctrine\DBAL\Platforms\PostgreSQL100Platform::doctrineTypeComments

Contains a list of all columns that should generate parseable column comments for type-detection
in reverse engineering scenarios.

property Doctrine\Common\EventManager Doctrine\DBAL\Platforms\PostgreSQL100Platform::_eventManager

property Doctrine\DBAL\Platforms\Keywords\KeywordListnull Doctrine\DBAL\Platforms\PostgreSQL100Platform::_keywords

Holds the KeywordList instance for the current platform.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getReservedKeywordsClass () : string

Returns the class name of the reserved keywords list.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getListSequencesSQL ($database) : string

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getJsonTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a JSON field.

By default this maps directly to a CLOB and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::initializeDoctrineTypeMappings () : void

Lazy load Doctrine Type Mappings.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getSmallIntTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a 2 byte integer column.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::hasNativeJsonType () : bool

Does this platform have native JSON type.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getCloseActiveDatabaseConnectionsSQL ($database) : string

Returns the SQL statement for closing currently active connections on the given database.

This is useful to force DROP DATABASE operations which could fail because of active connections.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::supportsColumnCollation () : bool

Does this platform support column collation?

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getColumnCollationDeclarationSQL ($collation) : string

Obtains DBMS specific SQL code portion needed to set the COLLATION
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getListTableColumnsSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::setUseBooleanTrueFalseStrings ($flag) : void

PostgreSQL has different behavior with some drivers
with regard to how booleans have to be handled.

Enables use of 'true'/'false' or otherwise 1 and 0 instead.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getSubstringExpression ($value, $from, $length = null) : string

Returns a SQL snippet to get a substring inside an SQL statement.

Note: Not SQL92, but common functionality.

SQLite only supports the 2 parameter variant of this function.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getNowExpression () : string

Returns the SQL snippet to get the current system date.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getRegexpExpression () : string

Returns the regular expression operator.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getLocateExpression ($str, $substr, $startPos = false) : string

Returns the SQL snippet to get the position of the first occurrence of substring $substr in string $str.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDateArithmeticIntervalExpression ($date, $operator, $interval, $unit) : string

Returns the SQL for a date arithmetic expression.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDateDiffExpression ($date1, $date2) : string

Returns the SQL to calculate the difference in days between the two passed dates.

Computes diff = date1 - date2.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::supportsSequences () : bool

Whether the platform supports sequences.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::supportsSchemas () : bool

Whether the platform supports database schemas.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDefaultSchemaName () : string

Returns the default schema name.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::supportsIdentityColumns () : bool

Whether the platform supports identity columns.

Identity columns are columns that receive an auto-generated value from the
database on insert of a row.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::supportsPartialIndexes () : bool

Whether the platform supports partial indexes.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::usesSequenceEmulatedIdentityColumns () : bool

Whether the platform emulates identity columns through sequences.

Some platforms that do not support identity columns natively
but support sequences can emulate identity columns by using
sequences.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getIdentitySequenceName ($tableName, $columnName) : string

Returns the name of the sequence for a particular identity column in a particular table.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::supportsCommentOnStatement () : bool

Whether this platform support the proprietary syntax "COMMENT ON asset".

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::prefersSequences () : bool

Whether the platform prefers sequences for ID generation.
Subclasses should override this method to return TRUE if they prefer sequences.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::hasNativeGuidType () : bool

Does this platform have native guid type.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getListDatabasesSQL () : string

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getListNamespacesSQL () : string

Returns the SQL statement for retrieving the namespaces defined in the database.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getListTablesSQL () : string

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getListViewsSQL ($database) : string

Returns the SQL to list all views of a database or user.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getListTableForeignKeysSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getCreateViewSQL ($name, $sql) : string

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDropViewSQL ($name) : string

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getListTableConstraintsSQL ($table) : string

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getListTableIndexesSQL ($table, $currentDatabase = null) : string

Returns the list of indexes for the current database.

The current database parameter is optional but will always be passed
when using the SchemaManager API and is the database the given table is in.

Attention: Some platforms only support currentDatabase when they
are connected with that database. Cross-database information schema
requests may be impossible.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getCreateDatabaseSQL ($name) : string

Returns the SQL to create a new database.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDisallowDatabaseConnectionsSQL ($database) : string

Returns the SQL statement for disallowing new connections on the given database.

This is useful to force DROP DATABASE operations which could fail because of active connections.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getAdvancedForeignKeyOptionsSQL ($foreignKey) : string

Returns the FOREIGN KEY query section dealing with non-standard options
as MATCH, INITIALLY DEFERRED, ON UPDATE, ...

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getAlterTableSQL ($diff) : string[]

Gets the SQL statements for altering an existing table.

This method returns an array of SQL statements, since some platforms need several statements.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getRenameIndexSQL ($oldIndexName, $index, $tableName) : string[]

Returns the SQL for renaming an index on a table.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getCommentOnColumnSQL ($tableName, $columnName, $comment) : string

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getCreateSequenceSQL ($sequence) : string

Returns the SQL to create a sequence on this platform.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getAlterSequenceSQL ($sequence) : string

Returns the SQL to change a sequence on this platform.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDropSequenceSQL ($sequence) : string

Returns the SQL snippet to drop an existing sequence.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getCreateSchemaSQL ($schemaName) : string

Returns the SQL to create a named schema.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDropForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to drop a foreign key.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::_getCreateTableSQL ($tableName, $columns, $options = []) : string[]

Returns the SQL used to create a table.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::convertBooleans ($item) : mixed

Some platforms need the boolean values to be converted.

The default conversion in this implementation converts to integers (false => 0, true => 1).

Note: if the input is not a boolean the original input might be returned.

There are two contexts when converting booleans: Literals and Prepared Statements.
This method should handle the literal case

Postgres wants boolean values converted to the strings 'true'/'false'.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::convertBooleansToDatabaseValue ($item) : mixed

This method should handle the prepared statements case. When there is no
distinction, it's OK to use the same method.

Note: if the input is not a boolean the original input might be returned.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::convertFromBoolean ($item) : boolnull

Some platforms have boolean literals that needs to be correctly converted

The default conversion tries to convert value into bool "(bool)$item"

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getSequenceNextValSQL ($sequenceName) : string

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getSetTransactionIsolationSQL ($level) : string

Returns the SQL to set the transaction isolation level.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getBooleanTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a boolean column.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getIntegerTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a 4 byte integer column.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getBigIntTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares an 8 byte integer column.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getGuidTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a GUID/UUID field.

By default this maps directly to a CHAR(36) and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDateTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime fields in
statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDateTimeTzTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime with timezone offset fields.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDateTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create date fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create time fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getGuidExpression () : string

Returns the global unique identifier expression.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::_getCommonIntegerTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares common properties of an integer column.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getVarcharTypeDeclarationSQLSnippet ($length, $fixed) : string

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getBinaryTypeDeclarationSQLSnippet ($length, $fixed) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getClobTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a CLOB column type.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getName () : string

Gets the name of the platform.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getSQLResultCasing ($column) : string

Gets the character casing of a column in an SQL result set of this platform.

PostgreSQL returns all column names in SQL result sets in lowercase.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDateTimeTzFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime with timezone value of this platform.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getEmptyIdentityInsertSQL ($quotedTableName, $quotedIdentifierColumnName) : string

Returns the insert SQL for an empty insert statement.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getTruncateTableSQL ($tableName, $cascade = false) : string

Generates a Truncate Table SQL statement for a given table.

Cascade is not supported on many platforms but would optionally cascade the truncate by
following the foreign keys.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getReadLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which locks rows in shared read lock.

This defaults to the ANSI SQL "FOR UPDATE", which is an exclusive lock (Write). Some database
vendors allow to lighten this constraint up to be a real read lock.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getVarcharMaxLength () : int

Gets the maximum length of a varchar field.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getBinaryMaxLength () : int

Gets the maximum length of a binary field.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getBinaryDefaultLength () : int

Gets the default length of a binary field.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getBlobTypeDeclarationSQL ($field) : string

Returns the SQL Snippet used to declare a BLOB column type.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDefaultValueDeclarationSQL ($field) : string

Obtains DBMS specific SQL code portion needed to set a default value
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getListTableMetadataSQL ($table, $schema = null) : string

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::__construct () : void

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::setEventManager ($eventManager) : void

Sets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getEventManager () : Doctrine\Common\EventManager

Gets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getVarcharTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a VARCHAR column type.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getBinaryTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::registerDoctrineTypeMapping ($dbType, $doctrineType) : void

Registers a doctrine type to be used in conjunction with a column type of this platform.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDoctrineTypeMapping ($dbType) : string

Gets the Doctrine type that is mapped for the given database column type.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::hasDoctrineTypeMappingFor ($dbType) : bool

Checks if a database type is currently supported by this platform.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::initializeCommentedDoctrineTypes () : void

Initializes the Doctrine Type comments instance variable for in_array() checks.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::isCommentedDoctrineType ($doctrineType) : bool

Is it necessary for the platform to add a parsable type comment to allow reverse engineering the given type?

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::markDoctrineTypeCommented ($doctrineType) : void

Marks this type as to be commented in ALTER TABLE and CREATE TABLE statements.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDoctrineTypeComment ($doctrineType) : string

Gets the comment to append to a column comment that helps parsing this type in reverse engineering.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getColumnComment ($column) : stringnull

Gets the comment of a passed column modified by potential doctrine type comment hints.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getIdentifierQuoteCharacter () : string

Gets the character used for identifier quoting.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getSqlCommentStartString () : string

Gets the string portion that starts an SQL comment.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getSqlCommentEndString () : string

Gets the string portion that ends an SQL comment.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getCharMaxLength () : int

Gets the maximum length of a char field.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getVarcharDefaultLength () : int

Gets the default length of a varchar field.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getWildcards () : string[]

Gets all SQL wildcard characters of the platform.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getAvgExpression ($column) : string

Returns the SQL snippet to get the average value of a column.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getCountExpression ($column) : string

Returns the SQL snippet to get the number of rows (without a NULL value) of a column.

If a '*' is used instead of a column the number of selected rows is returned.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getMaxExpression ($column) : string

Returns the SQL snippet to get the highest value of a column.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getMinExpression ($column) : string

Returns the SQL snippet to get the lowest value of a column.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getSumExpression ($column) : string

Returns the SQL snippet to get the total sum of a column.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getMd5Expression ($column) : string

Returns the SQL snippet to get the md5 sum of a field.

Note: Not SQL92, but common functionality.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getLengthExpression ($column) : string

Returns the SQL snippet to get the length of a text field.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getSqrtExpression ($column) : string

Returns the SQL snippet to get the squared value of a column.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getRoundExpression ($column, $decimals = 0) : string

Returns the SQL snippet to round a numeric field to the number of decimals specified.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getModExpression ($expression1, $expression2) : string

Returns the SQL snippet to get the remainder of the division operation $expression1 / $expression2.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getTrimExpression ($str, $mode = Doctrine\DBAL\Platforms\TrimMode::UNSPECIFIED, $char = false) : string

Returns the SQL snippet to trim a string.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getRtrimExpression ($str) : string

Returns the SQL snippet to trim trailing space characters from the expression.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getLtrimExpression ($str) : string

Returns the SQL snippet to trim leading space characters from the expression.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getUpperExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to uppercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getLowerExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to lowercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getConcatExpression () : string

Returns a SQL snippet to concatenate the given expressions.

Accepts an arbitrary number of string parameters. Each parameter must contain an expression.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getNotExpression ($expression) : string

Returns the SQL for a logical not.

Example:

$q = new Doctrine_Query();
$e = $q->expr;
$q->select('*')->from('table')
->where($e->eq('id', $e->not('null'));

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getIsNullExpression ($expression) : string

Returns the SQL that checks if an expression is null.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getIsNotNullExpression ($expression) : string

Returns the SQL that checks if an expression is not null.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getBetweenExpression ($expression, $value1, $value2) : string

Returns the SQL that checks if an expression evaluates to a value between two values.

The parameter $expression is checked if it is between $value1 and $value2.

Note: There is a slight difference in the way BETWEEN works on some databases.
http://www.w3schools.com/sql/sql_between.asp. If you want complete database
independence you should avoid using between().

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getAcosExpression ($value) : string

Returns the SQL to get the arccosine of a value.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getSinExpression ($value) : string

Returns the SQL to get the sine of a value.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getPiExpression () : string

Returns the SQL to get the PI value.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getCosExpression ($value) : string

Returns the SQL to get the cosine of a value.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDateAddSecondsExpression ($date, $seconds) : string

Returns the SQL to add the number of given seconds to a date.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDateSubSecondsExpression ($date, $seconds) : string

Returns the SQL to subtract the number of given seconds from a date.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDateAddMinutesExpression ($date, $minutes) : string

Returns the SQL to add the number of given minutes to a date.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDateSubMinutesExpression ($date, $minutes) : string

Returns the SQL to subtract the number of given minutes from a date.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDateAddHourExpression ($date, $hours) : string

Returns the SQL to add the number of given hours to a date.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDateSubHourExpression ($date, $hours) : string

Returns the SQL to subtract the number of given hours to a date.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDateAddDaysExpression ($date, $days) : string

Returns the SQL to add the number of given days to a date.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDateSubDaysExpression ($date, $days) : string

Returns the SQL to subtract the number of given days to a date.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDateAddWeeksExpression ($date, $weeks) : string

Returns the SQL to add the number of given weeks to a date.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDateSubWeeksExpression ($date, $weeks) : string

Returns the SQL to subtract the number of given weeks from a date.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDateAddMonthExpression ($date, $months) : string

Returns the SQL to add the number of given months to a date.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDateSubMonthExpression ($date, $months) : string

Returns the SQL to subtract the number of given months to a date.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDateAddQuartersExpression ($date, $quarters) : string

Returns the SQL to add the number of given quarters to a date.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDateSubQuartersExpression ($date, $quarters) : string

Returns the SQL to subtract the number of given quarters from a date.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDateAddYearsExpression ($date, $years) : string

Returns the SQL to add the number of given years to a date.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDateSubYearsExpression ($date, $years) : string

Returns the SQL to subtract the number of given years from a date.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getBitAndComparisonExpression ($value1, $value2) : string

Returns the SQL bit AND comparison expression.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getBitOrComparisonExpression ($value1, $value2) : string

Returns the SQL bit OR comparison expression.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getForUpdateSQL () : string

Returns the FOR UPDATE expression.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::appendLockHint ($fromClause, $lockMode) : string

Honors that some SQL vendors such as MsSql use table hints for locking instead of the ANSI SQL FOR UPDATE specification.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getWriteLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which obtains an exclusive lock on the rows.

The semantics of this lock mode should equal the SELECT .. FOR UPDATE of the ANSI SQL standard.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDropDatabaseSQL ($database) : string

Returns the SQL snippet to drop an existing database.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDropTableSQL ($table) : string

Returns the SQL snippet to drop an existing table.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDropTemporaryTableSQL ($table) : string

Returns the SQL to safely drop a temporary table WITHOUT implicitly committing an open transaction.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDropIndexSQL ($index, $table = null) : string

Returns the SQL to drop an index from a table.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDropConstraintSQL ($constraint, $table) : string

Returns the SQL to drop a constraint.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getCreateTableSQL ($table, $createFlags = self::CREATE_INDEXES) : string[]

Returns the SQL statement(s) to create a table with the specified name, columns and constraints
on this platform.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getCommentOnTableSQL ($tableName, $comment) : string

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getInlineColumnCommentSQL ($comment) : string

Returns the SQL to create inline comment on a column.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getCreateTemporaryTableSnippetSQL () : string

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getCreateConstraintSQL ($constraint, $table) : string

Returns the SQL to create a constraint on a table on this platform.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getCreateIndexSQL ($index, $table) : string

Returns the SQL to create an index on a table on this platform.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getPartialIndexSQL ($index) : string

Adds condition for partial index.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getCreateIndexSQLFlags ($index) : string

Adds additional flags for index generation.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getCreatePrimaryKeySQL ($index, $table) : string

Returns the SQL to create an unnamed primary key constraint.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::quoteIdentifier ($str) : string

Quotes a string so that it can be safely used as a table or column name,
even if it is a reserved word of the platform. This also detects identifier
chains separated by dot and quotes them independently.

NOTE: Just because you CAN use quoted identifiers doesn't mean
you SHOULD use them. In general, they end up causing way more
problems than they solve.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::quoteSingleIdentifier ($str) : string

Quotes a single identifier (no dot chain separation).

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getCreateForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to create a new foreign key.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::onSchemaAlterTableAddColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::onSchemaAlterTableRemoveColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::onSchemaAlterTableChangeColumn ($columnDiff, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::onSchemaAlterTableRenameColumn ($oldColumnName, $column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::onSchemaAlterTable ($diff, &$sql) : bool

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getPreAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getPostAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::_getAlterTableIndexForeignKeySQL ($diff) : string[]

Common code for alter table statement generation that updates the changed Index and Foreign Key definitions.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getColumnDeclarationListSQL ($fields) : string

Gets declaration of a number of fields in bulk.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getColumnDeclarationSQL ($name, $field) : string

Obtains DBMS specific SQL code portion needed to declare a generic type
field to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDecimalTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a floating point column of arbitrary precision.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getCheckDeclarationSQL ($definition) : string

Obtains DBMS specific SQL code portion needed to set a CHECK constraint
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getUniqueConstraintDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set a unique
constraint declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getIndexDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getCustomTypeDeclarationSQL ($columnDef) : string

Obtains SQL code portion needed to create a custom column,
e.g. when a field has the "columnDefinition" keyword.
Only "AUTOINCREMENT" and "PRIMARY KEY" are added if appropriate.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getIndexFieldDeclarationListSQL ($columnsOrIndex) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getTemporaryTableSQL () : string

Returns the required SQL string that fits between CREATE ... TABLE
to create the table as a temporary table.

Should be overridden in driver classes to return the correct string for the
specific database type.

The default is to return the string "TEMPORARY" - this will result in a
SQL error for any database that does not support temporary tables, or that
requires a different SQL command from "CREATE TEMPORARY TABLE".

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getTemporaryTableName ($tableName) : string

Some vendors require temporary table names to be qualified specially.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getForeignKeyDeclarationSQL ($foreignKey) : string

Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getForeignKeyReferentialActionSQL ($action) : string

Returns the given referential action in uppercase if valid, otherwise throws an exception.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getForeignKeyBaseDeclarationSQL ($foreignKey) : string

Obtains DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getUniqueFieldDeclarationSQL () : string

Obtains DBMS specific SQL code portion needed to set the UNIQUE constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getColumnCharsetDeclarationSQL ($charset) : string

Obtains DBMS specific SQL code portion needed to set the CHARACTER SET
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::prefersIdentityColumns () : bool

Whether the platform prefers identity columns (eg. autoincrement) for ID generation.
Subclasses should override this method to return TRUE if they prefer identity columns.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getCurrentDateSQL () : string

Returns the SQL specific for the platform to get the current date.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getCurrentTimeSQL () : string

Returns the SQL specific for the platform to get the current time.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getCurrentTimestampSQL () : string

Returns the SQL specific for the platform to get the current timestamp

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::_getTransactionIsolationLevelSQL ($level) : string

Returns the SQL for a given transaction isolation level Connection constant.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getListUsersSQL () : string

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getFloatDeclarationSQL ($fieldDeclaration) : string

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDefaultTransactionIsolationLevel () : int

Gets the default transaction isolation level of the platform.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::supportsIndexes () : bool

Whether the platform supports indexes.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::supportsColumnLengthIndexes () : bool

Whether the platform supports indexes with column length definitions.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::supportsAlterTable () : bool

Whether the platform supports altering tables.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::supportsTransactions () : bool

Whether the platform supports transactions.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::supportsSavepoints () : bool

Whether the platform supports savepoints.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::supportsReleaseSavepoints () : bool

Whether the platform supports releasing savepoints.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::supportsPrimaryConstraints () : bool

Whether the platform supports primary key constraints.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::supportsForeignKeyConstraints () : bool

Whether the platform supports foreign key constraints.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::supportsForeignKeyOnUpdate () : bool

Whether this platform supports onUpdate in foreign key constraints.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::canEmulateSchemas () : bool

Whether this platform can emulate schemas.

Platforms that either support or emulate schemas don't automatically
filter a schema for the namespaced elements in {@link
AbstractManager#createSchema}.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::supportsCreateDropDatabase () : bool

Whether this platform supports create database.

Some databases don't allow to create and drop databases at all or only with certain tools.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::supportsGettingAffectedRows () : bool

Whether the platform supports getting the affected rows of a recent update/delete type query.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::supportsInlineColumnComments () : bool

Whether this platform support to add inline column comments as postfix.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getIdentityColumnNullInsertSQL () : void

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::supportsViews () : bool

Whether this platform supports views.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDateTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime value of this platform.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDateFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored date value of this platform.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored time value of this platform.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::modifyLimitQuery ($query, $limit, $offset = null) : string

Adds an driver-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::doModifyLimitQuery ($query, $limit, $offset) : string

Adds an platform-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::supportsLimitOffset () : bool

Whether the database platform support offsets in modify limit clauses.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::fixSchemaElementName ($schemaElementName) : string

Makes any fixes to a name of a schema element (table, sequence, ...) that are required
by restrictions of the platform, like a maximum length.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getMaxIdentifierLength () : int

Maximum length of any given database identifier, like tables or column names.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getDummySelectSQL () : string

This is for test reasons, many vendors have special requirements for dummy statements.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::createSavePoint ($savepoint) : string

Returns the SQL to create a new savepoint.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::releaseSavePoint ($savepoint) : string

Returns the SQL to release a savepoint.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::rollbackSavePoint ($savepoint) : string

Returns the SQL to rollback a savepoint.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getReservedKeywordsList () : Doctrine\DBAL\Platforms\Keywords\KeywordList

Returns the keyword list instance of this platform.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::quoteStringLiteral ($str) : string

Quotes a literal string.
This method is NOT meant to fix SQL injections!
It is only meant to escape this platform's string literal
quote character inside the given literal string.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getStringLiteralQuoteCharacter () : string

Gets the character used for string literal quoting.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::escapeStringForLike ($inputString, $escapeChar) : string

Escapes metacharacters in a string intended to be used with a LIKE
operator.

method Doctrine\DBAL\Platforms\PostgreSQL100Platform::getLikeWildcardCharacters () : string

class Doctrine\DBAL\Platforms::SqlitePlatform

The SqlitePlatform class describes the specifics and dialects of the SQLite
database platform.

classconstant integer Doctrine\DBAL\Platforms\SqlitePlatform::CREATE_INDEXES

classconstant integer Doctrine\DBAL\Platforms\SqlitePlatform::CREATE_FOREIGNKEYS

classconstant string Doctrine\DBAL\Platforms\SqlitePlatform::DATE_INTERVAL_UNIT_SECOND

classconstant string Doctrine\DBAL\Platforms\SqlitePlatform::DATE_INTERVAL_UNIT_MINUTE

classconstant string Doctrine\DBAL\Platforms\SqlitePlatform::DATE_INTERVAL_UNIT_HOUR

classconstant string Doctrine\DBAL\Platforms\SqlitePlatform::DATE_INTERVAL_UNIT_DAY

classconstant string Doctrine\DBAL\Platforms\SqlitePlatform::DATE_INTERVAL_UNIT_WEEK

classconstant string Doctrine\DBAL\Platforms\SqlitePlatform::DATE_INTERVAL_UNIT_MONTH

classconstant string Doctrine\DBAL\Platforms\SqlitePlatform::DATE_INTERVAL_UNIT_QUARTER

classconstant string Doctrine\DBAL\Platforms\SqlitePlatform::DATE_INTERVAL_UNIT_YEAR

classconstant integer Doctrine\DBAL\Platforms\SqlitePlatform::TRIM_UNSPECIFIED

classconstant integer Doctrine\DBAL\Platforms\SqlitePlatform::TRIM_LEADING

classconstant integer Doctrine\DBAL\Platforms\SqlitePlatform::TRIM_TRAILING

classconstant integer Doctrine\DBAL\Platforms\SqlitePlatform::TRIM_BOTH

property string[]null Doctrine\DBAL\Platforms\SqlitePlatform::doctrineTypeMapping

property string[]null Doctrine\DBAL\Platforms\SqlitePlatform::doctrineTypeComments

Contains a list of all columns that should generate parseable column comments for type-detection
in reverse engineering scenarios.

property Doctrine\Common\EventManager Doctrine\DBAL\Platforms\SqlitePlatform::_eventManager

property Doctrine\DBAL\Platforms\Keywords\KeywordListnull Doctrine\DBAL\Platforms\SqlitePlatform::_keywords

Holds the KeywordList instance for the current platform.

method Doctrine\DBAL\Platforms\SqlitePlatform::getRegexpExpression () : string

Returns the regular expression operator.

method Doctrine\DBAL\Platforms\SqlitePlatform::getGuidExpression () : string

Returns the global unique identifier expression.

method Doctrine\DBAL\Platforms\SqlitePlatform::getNowExpression ($type = "timestamp") : string

Returns the SQL snippet to get the current system date.

method Doctrine\DBAL\Platforms\SqlitePlatform::getTrimExpression ($str, $pos = Doctrine\DBAL\Platforms\TrimMode::UNSPECIFIED, $char = false) : string

Returns the SQL snippet to trim a string.

method Doctrine\DBAL\Platforms\SqlitePlatform::getSubstringExpression ($value, $position, $length = null) : string

Returns a SQL snippet to get a substring inside an SQL statement.

Note: Not SQL92, but common functionality.

SQLite only supports the 2 parameter variant of this function.

SQLite only supports the 2 parameter variant of this function

method Doctrine\DBAL\Platforms\SqlitePlatform::getLocateExpression ($str, $substr, $startPos = false) : string

Returns the SQL snippet to get the position of the first occurrence of substring $substr in string $str.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDateArithmeticIntervalExpression ($date, $operator, $interval, $unit) : string

Returns the SQL for a date arithmetic expression.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDateDiffExpression ($date1, $date2) : string

Returns the SQL to calculate the difference in days between the two passed dates.

Computes diff = date1 - date2.

method Doctrine\DBAL\Platforms\SqlitePlatform::_getTransactionIsolationLevelSQL ($level) : string

Returns the SQL for a given transaction isolation level Connection constant.

method Doctrine\DBAL\Platforms\SqlitePlatform::getSetTransactionIsolationSQL ($level) : string

Returns the SQL to set the transaction isolation level.

method Doctrine\DBAL\Platforms\SqlitePlatform::prefersIdentityColumns () : bool

Whether the platform prefers identity columns (eg. autoincrement) for ID generation.
Subclasses should override this method to return TRUE if they prefer identity columns.

method Doctrine\DBAL\Platforms\SqlitePlatform::getBooleanTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a boolean column.

method Doctrine\DBAL\Platforms\SqlitePlatform::getIntegerTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a 4 byte integer column.

method Doctrine\DBAL\Platforms\SqlitePlatform::getBigIntTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares an 8 byte integer column.

method Doctrine\DBAL\Platforms\SqlitePlatform::getTinyIntTypeDeclarationSql ($field) : void

method Doctrine\DBAL\Platforms\SqlitePlatform::getSmallIntTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a 2 byte integer column.

method Doctrine\DBAL\Platforms\SqlitePlatform::getMediumIntTypeDeclarationSql ($field) : void

method Doctrine\DBAL\Platforms\SqlitePlatform::getDateTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime fields in
statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDateTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create date fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\SqlitePlatform::getTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create time fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\SqlitePlatform::_getCommonIntegerTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares common properties of an integer column.

method Doctrine\DBAL\Platforms\SqlitePlatform::getForeignKeyDeclarationSQL ($foreignKey) : string

Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SqlitePlatform::_getCreateTableSQL ($name, $columns, $options = []) : string[]

Returns the SQL used to create a table.

method Doctrine\DBAL\Platforms\SqlitePlatform::getVarcharTypeDeclarationSQLSnippet ($length, $fixed) : string

method Doctrine\DBAL\Platforms\SqlitePlatform::getBinaryTypeDeclarationSQLSnippet ($length, $fixed) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\SqlitePlatform::getBinaryMaxLength () : int

Gets the maximum length of a binary field.

method Doctrine\DBAL\Platforms\SqlitePlatform::getBinaryDefaultLength () : int

Gets the default length of a binary field.

method Doctrine\DBAL\Platforms\SqlitePlatform::getClobTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a CLOB column type.

method Doctrine\DBAL\Platforms\SqlitePlatform::getListTableConstraintsSQL ($table) : string

method Doctrine\DBAL\Platforms\SqlitePlatform::getListTableColumnsSQL ($table, $currentDatabase = null) : string

method Doctrine\DBAL\Platforms\SqlitePlatform::getListTableIndexesSQL ($table, $currentDatabase = null) : string

Returns the list of indexes for the current database.

The current database parameter is optional but will always be passed
when using the SchemaManager API and is the database the given table is in.

Attention: Some platforms only support currentDatabase when they
are connected with that database. Cross-database information schema
requests may be impossible.

method Doctrine\DBAL\Platforms\SqlitePlatform::getListTablesSQL () : string

method Doctrine\DBAL\Platforms\SqlitePlatform::getListViewsSQL ($database) : string

Returns the SQL to list all views of a database or user.

method Doctrine\DBAL\Platforms\SqlitePlatform::getCreateViewSQL ($name, $sql) : string

method Doctrine\DBAL\Platforms\SqlitePlatform::getDropViewSQL ($name) : string

method Doctrine\DBAL\Platforms\SqlitePlatform::getAdvancedForeignKeyOptionsSQL ($foreignKey) : string

Returns the FOREIGN KEY query section dealing with non-standard options
as MATCH, INITIALLY DEFERRED, ON UPDATE, ...

method Doctrine\DBAL\Platforms\SqlitePlatform::supportsIdentityColumns () : bool

Whether the platform supports identity columns.

Identity columns are columns that receive an auto-generated value from the
database on insert of a row.

method Doctrine\DBAL\Platforms\SqlitePlatform::supportsColumnCollation () : bool

Does this platform support column collation?

method Doctrine\DBAL\Platforms\SqlitePlatform::supportsInlineColumnComments () : bool

Whether this platform support to add inline column comments as postfix.

method Doctrine\DBAL\Platforms\SqlitePlatform::getName () : string

Gets the name of the platform.

method Doctrine\DBAL\Platforms\SqlitePlatform::getTruncateTableSQL ($tableName, $cascade = false) : string

Generates a Truncate Table SQL statement for a given table.

Cascade is not supported on many platforms but would optionally cascade the truncate by
following the foreign keys.

method Doctrine\DBAL\Platforms\SqlitePlatform::udfSqrt ($value) : float

User-defined function for Sqlite that is used with PDO::sqliteCreateFunction().

method Doctrine\DBAL\Platforms\SqlitePlatform::udfMod ($a, $b) : int

User-defined function for Sqlite that implements MOD(a, b).

method Doctrine\DBAL\Platforms\SqlitePlatform::udfLocate ($str, $substr, $offset = 0) : int

method Doctrine\DBAL\Platforms\SqlitePlatform::getForUpdateSql () : string

Returns the FOR UPDATE expression.

method Doctrine\DBAL\Platforms\SqlitePlatform::getInlineColumnCommentSQL ($comment) : string

Returns the SQL to create inline comment on a column.

method Doctrine\DBAL\Platforms\SqlitePlatform::initializeDoctrineTypeMappings () : void

Lazy load Doctrine Type Mappings.

method Doctrine\DBAL\Platforms\SqlitePlatform::getReservedKeywordsClass () : string

Returns the class name of the reserved keywords list.

method Doctrine\DBAL\Platforms\SqlitePlatform::getPreAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\SqlitePlatform::getPostAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\SqlitePlatform::doModifyLimitQuery ($query, $limit, $offset) : string

Adds an platform-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\SqlitePlatform::getBlobTypeDeclarationSQL ($field) : string

Returns the SQL Snippet used to declare a BLOB column type.

method Doctrine\DBAL\Platforms\SqlitePlatform::getTemporaryTableName ($tableName) : string

Some vendors require temporary table names to be qualified specially.

method Doctrine\DBAL\Platforms\SqlitePlatform::canEmulateSchemas () : bool

Whether this platform can emulate schemas.

Platforms that either support or emulate schemas don't automatically
filter a schema for the namespaced elements in {@link
AbstractManager#createSchema}.

Sqlite Platform emulates schema by underscoring each dot and generating tables
into the default database.

This hack is implemented to be able to use SQLite as testdriver when
using schema supporting databases.

method Doctrine\DBAL\Platforms\SqlitePlatform::supportsForeignKeyConstraints () : bool

Whether the platform supports foreign key constraints.

method Doctrine\DBAL\Platforms\SqlitePlatform::getCreatePrimaryKeySQL ($index, $table) : string

Returns the SQL to create an unnamed primary key constraint.

method Doctrine\DBAL\Platforms\SqlitePlatform::getCreateForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to create a new foreign key.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDropForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to drop a foreign key.

method Doctrine\DBAL\Platforms\SqlitePlatform::getCreateConstraintSQL ($constraint, $table) : string

Returns the SQL to create a constraint on a table on this platform.

method Doctrine\DBAL\Platforms\SqlitePlatform::getCreateTableSQL ($table, $createFlags = self::CREATE_INDEXES) : string[]

Returns the SQL statement(s) to create a table with the specified name, columns and constraints
on this platform.

method Doctrine\DBAL\Platforms\SqlitePlatform::getListTableForeignKeysSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\SqlitePlatform::getAlterTableSQL ($diff) : string[]

Gets the SQL statements for altering an existing table.

This method returns an array of SQL statements, since some platforms need several statements.

method Doctrine\DBAL\Platforms\SqlitePlatform::__construct () : void

method Doctrine\DBAL\Platforms\SqlitePlatform::setEventManager ($eventManager) : void

Sets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\SqlitePlatform::getEventManager () : Doctrine\Common\EventManager

Gets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\SqlitePlatform::getVarcharTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a VARCHAR column type.

method Doctrine\DBAL\Platforms\SqlitePlatform::getBinaryTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\SqlitePlatform::getGuidTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a GUID/UUID field.

By default this maps directly to a CHAR(36) and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\SqlitePlatform::getJsonTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a JSON field.

By default this maps directly to a CLOB and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\SqlitePlatform::registerDoctrineTypeMapping ($dbType, $doctrineType) : void

Registers a doctrine type to be used in conjunction with a column type of this platform.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDoctrineTypeMapping ($dbType) : string

Gets the Doctrine type that is mapped for the given database column type.

method Doctrine\DBAL\Platforms\SqlitePlatform::hasDoctrineTypeMappingFor ($dbType) : bool

Checks if a database type is currently supported by this platform.

method Doctrine\DBAL\Platforms\SqlitePlatform::initializeCommentedDoctrineTypes () : void

Initializes the Doctrine Type comments instance variable for in_array() checks.

method Doctrine\DBAL\Platforms\SqlitePlatform::isCommentedDoctrineType ($doctrineType) : bool

Is it necessary for the platform to add a parsable type comment to allow reverse engineering the given type?

method Doctrine\DBAL\Platforms\SqlitePlatform::markDoctrineTypeCommented ($doctrineType) : void

Marks this type as to be commented in ALTER TABLE and CREATE TABLE statements.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDoctrineTypeComment ($doctrineType) : string

Gets the comment to append to a column comment that helps parsing this type in reverse engineering.

method Doctrine\DBAL\Platforms\SqlitePlatform::getColumnComment ($column) : stringnull

Gets the comment of a passed column modified by potential doctrine type comment hints.

method Doctrine\DBAL\Platforms\SqlitePlatform::getIdentifierQuoteCharacter () : string

Gets the character used for identifier quoting.

method Doctrine\DBAL\Platforms\SqlitePlatform::getSqlCommentStartString () : string

Gets the string portion that starts an SQL comment.

method Doctrine\DBAL\Platforms\SqlitePlatform::getSqlCommentEndString () : string

Gets the string portion that ends an SQL comment.

method Doctrine\DBAL\Platforms\SqlitePlatform::getCharMaxLength () : int

Gets the maximum length of a char field.

method Doctrine\DBAL\Platforms\SqlitePlatform::getVarcharMaxLength () : int

Gets the maximum length of a varchar field.

method Doctrine\DBAL\Platforms\SqlitePlatform::getVarcharDefaultLength () : int

Gets the default length of a varchar field.

method Doctrine\DBAL\Platforms\SqlitePlatform::getWildcards () : string[]

Gets all SQL wildcard characters of the platform.

method Doctrine\DBAL\Platforms\SqlitePlatform::getAvgExpression ($column) : string

Returns the SQL snippet to get the average value of a column.

method Doctrine\DBAL\Platforms\SqlitePlatform::getCountExpression ($column) : string

Returns the SQL snippet to get the number of rows (without a NULL value) of a column.

If a '*' is used instead of a column the number of selected rows is returned.

method Doctrine\DBAL\Platforms\SqlitePlatform::getMaxExpression ($column) : string

Returns the SQL snippet to get the highest value of a column.

method Doctrine\DBAL\Platforms\SqlitePlatform::getMinExpression ($column) : string

Returns the SQL snippet to get the lowest value of a column.

method Doctrine\DBAL\Platforms\SqlitePlatform::getSumExpression ($column) : string

Returns the SQL snippet to get the total sum of a column.

method Doctrine\DBAL\Platforms\SqlitePlatform::getMd5Expression ($column) : string

Returns the SQL snippet to get the md5 sum of a field.

Note: Not SQL92, but common functionality.

method Doctrine\DBAL\Platforms\SqlitePlatform::getLengthExpression ($column) : string

Returns the SQL snippet to get the length of a text field.

method Doctrine\DBAL\Platforms\SqlitePlatform::getSqrtExpression ($column) : string

Returns the SQL snippet to get the squared value of a column.

method Doctrine\DBAL\Platforms\SqlitePlatform::getRoundExpression ($column, $decimals = 0) : string

Returns the SQL snippet to round a numeric field to the number of decimals specified.

method Doctrine\DBAL\Platforms\SqlitePlatform::getModExpression ($expression1, $expression2) : string

Returns the SQL snippet to get the remainder of the division operation $expression1 / $expression2.

method Doctrine\DBAL\Platforms\SqlitePlatform::getRtrimExpression ($str) : string

Returns the SQL snippet to trim trailing space characters from the expression.

method Doctrine\DBAL\Platforms\SqlitePlatform::getLtrimExpression ($str) : string

Returns the SQL snippet to trim leading space characters from the expression.

method Doctrine\DBAL\Platforms\SqlitePlatform::getUpperExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to uppercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\SqlitePlatform::getLowerExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to lowercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\SqlitePlatform::getConcatExpression () : string

Returns a SQL snippet to concatenate the given expressions.

Accepts an arbitrary number of string parameters. Each parameter must contain an expression.

method Doctrine\DBAL\Platforms\SqlitePlatform::getNotExpression ($expression) : string

Returns the SQL for a logical not.

Example:

$q = new Doctrine_Query();
$e = $q->expr;
$q->select('*')->from('table')
->where($e->eq('id', $e->not('null'));

method Doctrine\DBAL\Platforms\SqlitePlatform::getIsNullExpression ($expression) : string

Returns the SQL that checks if an expression is null.

method Doctrine\DBAL\Platforms\SqlitePlatform::getIsNotNullExpression ($expression) : string

Returns the SQL that checks if an expression is not null.

method Doctrine\DBAL\Platforms\SqlitePlatform::getBetweenExpression ($expression, $value1, $value2) : string

Returns the SQL that checks if an expression evaluates to a value between two values.

The parameter $expression is checked if it is between $value1 and $value2.

Note: There is a slight difference in the way BETWEEN works on some databases.
http://www.w3schools.com/sql/sql_between.asp. If you want complete database
independence you should avoid using between().

method Doctrine\DBAL\Platforms\SqlitePlatform::getAcosExpression ($value) : string

Returns the SQL to get the arccosine of a value.

method Doctrine\DBAL\Platforms\SqlitePlatform::getSinExpression ($value) : string

Returns the SQL to get the sine of a value.

method Doctrine\DBAL\Platforms\SqlitePlatform::getPiExpression () : string

Returns the SQL to get the PI value.

method Doctrine\DBAL\Platforms\SqlitePlatform::getCosExpression ($value) : string

Returns the SQL to get the cosine of a value.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDateAddSecondsExpression ($date, $seconds) : string

Returns the SQL to add the number of given seconds to a date.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDateSubSecondsExpression ($date, $seconds) : string

Returns the SQL to subtract the number of given seconds from a date.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDateAddMinutesExpression ($date, $minutes) : string

Returns the SQL to add the number of given minutes to a date.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDateSubMinutesExpression ($date, $minutes) : string

Returns the SQL to subtract the number of given minutes from a date.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDateAddHourExpression ($date, $hours) : string

Returns the SQL to add the number of given hours to a date.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDateSubHourExpression ($date, $hours) : string

Returns the SQL to subtract the number of given hours to a date.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDateAddDaysExpression ($date, $days) : string

Returns the SQL to add the number of given days to a date.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDateSubDaysExpression ($date, $days) : string

Returns the SQL to subtract the number of given days to a date.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDateAddWeeksExpression ($date, $weeks) : string

Returns the SQL to add the number of given weeks to a date.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDateSubWeeksExpression ($date, $weeks) : string

Returns the SQL to subtract the number of given weeks from a date.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDateAddMonthExpression ($date, $months) : string

Returns the SQL to add the number of given months to a date.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDateSubMonthExpression ($date, $months) : string

Returns the SQL to subtract the number of given months to a date.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDateAddQuartersExpression ($date, $quarters) : string

Returns the SQL to add the number of given quarters to a date.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDateSubQuartersExpression ($date, $quarters) : string

Returns the SQL to subtract the number of given quarters from a date.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDateAddYearsExpression ($date, $years) : string

Returns the SQL to add the number of given years to a date.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDateSubYearsExpression ($date, $years) : string

Returns the SQL to subtract the number of given years from a date.

method Doctrine\DBAL\Platforms\SqlitePlatform::getBitAndComparisonExpression ($value1, $value2) : string

Returns the SQL bit AND comparison expression.

method Doctrine\DBAL\Platforms\SqlitePlatform::getBitOrComparisonExpression ($value1, $value2) : string

Returns the SQL bit OR comparison expression.

method Doctrine\DBAL\Platforms\SqlitePlatform::appendLockHint ($fromClause, $lockMode) : string

Honors that some SQL vendors such as MsSql use table hints for locking instead of the ANSI SQL FOR UPDATE specification.

method Doctrine\DBAL\Platforms\SqlitePlatform::getReadLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which locks rows in shared read lock.

This defaults to the ANSI SQL "FOR UPDATE", which is an exclusive lock (Write). Some database
vendors allow to lighten this constraint up to be a real read lock.

method Doctrine\DBAL\Platforms\SqlitePlatform::getWriteLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which obtains an exclusive lock on the rows.

The semantics of this lock mode should equal the SELECT .. FOR UPDATE of the ANSI SQL standard.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDropDatabaseSQL ($database) : string

Returns the SQL snippet to drop an existing database.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDropTableSQL ($table) : string

Returns the SQL snippet to drop an existing table.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDropTemporaryTableSQL ($table) : string

Returns the SQL to safely drop a temporary table WITHOUT implicitly committing an open transaction.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDropIndexSQL ($index, $table = null) : string

Returns the SQL to drop an index from a table.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDropConstraintSQL ($constraint, $table) : string

Returns the SQL to drop a constraint.

method Doctrine\DBAL\Platforms\SqlitePlatform::getCommentOnTableSQL ($tableName, $comment) : string

method Doctrine\DBAL\Platforms\SqlitePlatform::getCommentOnColumnSQL ($tableName, $columnName, $comment) : string

method Doctrine\DBAL\Platforms\SqlitePlatform::getCreateTemporaryTableSnippetSQL () : string

method Doctrine\DBAL\Platforms\SqlitePlatform::getCreateSequenceSQL ($sequence) : string

Returns the SQL to create a sequence on this platform.

method Doctrine\DBAL\Platforms\SqlitePlatform::getAlterSequenceSQL ($sequence) : string

Returns the SQL to change a sequence on this platform.

method Doctrine\DBAL\Platforms\SqlitePlatform::getCreateIndexSQL ($index, $table) : string

Returns the SQL to create an index on a table on this platform.

method Doctrine\DBAL\Platforms\SqlitePlatform::getPartialIndexSQL ($index) : string

Adds condition for partial index.

method Doctrine\DBAL\Platforms\SqlitePlatform::getCreateIndexSQLFlags ($index) : string

Adds additional flags for index generation.

method Doctrine\DBAL\Platforms\SqlitePlatform::getCreateSchemaSQL ($schemaName) : string

Returns the SQL to create a named schema.

method Doctrine\DBAL\Platforms\SqlitePlatform::quoteIdentifier ($str) : string

Quotes a string so that it can be safely used as a table or column name,
even if it is a reserved word of the platform. This also detects identifier
chains separated by dot and quotes them independently.

NOTE: Just because you CAN use quoted identifiers doesn't mean
you SHOULD use them. In general, they end up causing way more
problems than they solve.

method Doctrine\DBAL\Platforms\SqlitePlatform::quoteSingleIdentifier ($str) : string

Quotes a single identifier (no dot chain separation).

method Doctrine\DBAL\Platforms\SqlitePlatform::onSchemaAlterTableAddColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SqlitePlatform::onSchemaAlterTableRemoveColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SqlitePlatform::onSchemaAlterTableChangeColumn ($columnDiff, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SqlitePlatform::onSchemaAlterTableRenameColumn ($oldColumnName, $column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SqlitePlatform::onSchemaAlterTable ($diff, &$sql) : bool

method Doctrine\DBAL\Platforms\SqlitePlatform::getRenameIndexSQL ($oldIndexName, $index, $tableName) : string[]

Returns the SQL for renaming an index on a table.

method Doctrine\DBAL\Platforms\SqlitePlatform::_getAlterTableIndexForeignKeySQL ($diff) : string[]

Common code for alter table statement generation that updates the changed Index and Foreign Key definitions.

method Doctrine\DBAL\Platforms\SqlitePlatform::getColumnDeclarationListSQL ($fields) : string

Gets declaration of a number of fields in bulk.

method Doctrine\DBAL\Platforms\SqlitePlatform::getColumnDeclarationSQL ($name, $field) : string

Obtains DBMS specific SQL code portion needed to declare a generic type
field to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDecimalTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a floating point column of arbitrary precision.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDefaultValueDeclarationSQL ($field) : string

Obtains DBMS specific SQL code portion needed to set a default value
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SqlitePlatform::getCheckDeclarationSQL ($definition) : string

Obtains DBMS specific SQL code portion needed to set a CHECK constraint
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SqlitePlatform::getUniqueConstraintDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set a unique
constraint declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SqlitePlatform::getIndexDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SqlitePlatform::getCustomTypeDeclarationSQL ($columnDef) : string

Obtains SQL code portion needed to create a custom column,
e.g. when a field has the "columnDefinition" keyword.
Only "AUTOINCREMENT" and "PRIMARY KEY" are added if appropriate.

method Doctrine\DBAL\Platforms\SqlitePlatform::getIndexFieldDeclarationListSQL ($columnsOrIndex) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SqlitePlatform::getTemporaryTableSQL () : string

Returns the required SQL string that fits between CREATE ... TABLE
to create the table as a temporary table.

Should be overridden in driver classes to return the correct string for the
specific database type.

The default is to return the string "TEMPORARY" - this will result in a
SQL error for any database that does not support temporary tables, or that
requires a different SQL command from "CREATE TEMPORARY TABLE".

method Doctrine\DBAL\Platforms\SqlitePlatform::getForeignKeyReferentialActionSQL ($action) : string

Returns the given referential action in uppercase if valid, otherwise throws an exception.

method Doctrine\DBAL\Platforms\SqlitePlatform::getForeignKeyBaseDeclarationSQL ($foreignKey) : string

Obtains DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SqlitePlatform::getUniqueFieldDeclarationSQL () : string

Obtains DBMS specific SQL code portion needed to set the UNIQUE constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SqlitePlatform::getColumnCharsetDeclarationSQL ($charset) : string

Obtains DBMS specific SQL code portion needed to set the CHARACTER SET
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SqlitePlatform::getColumnCollationDeclarationSQL ($collation) : string

Obtains DBMS specific SQL code portion needed to set the COLLATION
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SqlitePlatform::prefersSequences () : bool

Whether the platform prefers sequences for ID generation.
Subclasses should override this method to return TRUE if they prefer sequences.

method Doctrine\DBAL\Platforms\SqlitePlatform::convertBooleans ($item) : mixed

Some platforms need the boolean values to be converted.

The default conversion in this implementation converts to integers (false => 0, true => 1).

Note: if the input is not a boolean the original input might be returned.

There are two contexts when converting booleans: Literals and Prepared Statements.
This method should handle the literal case

method Doctrine\DBAL\Platforms\SqlitePlatform::convertFromBoolean ($item) : boolnull

Some platforms have boolean literals that needs to be correctly converted

The default conversion tries to convert value into bool "(bool)$item"

method Doctrine\DBAL\Platforms\SqlitePlatform::convertBooleansToDatabaseValue ($item) : mixed

This method should handle the prepared statements case. When there is no
distinction, it's OK to use the same method.

Note: if the input is not a boolean the original input might be returned.

method Doctrine\DBAL\Platforms\SqlitePlatform::getCurrentDateSQL () : string

Returns the SQL specific for the platform to get the current date.

method Doctrine\DBAL\Platforms\SqlitePlatform::getCurrentTimeSQL () : string

Returns the SQL specific for the platform to get the current time.

method Doctrine\DBAL\Platforms\SqlitePlatform::getCurrentTimestampSQL () : string

Returns the SQL specific for the platform to get the current timestamp

method Doctrine\DBAL\Platforms\SqlitePlatform::getListDatabasesSQL () : string

method Doctrine\DBAL\Platforms\SqlitePlatform::getListNamespacesSQL () : string

Returns the SQL statement for retrieving the namespaces defined in the database.

method Doctrine\DBAL\Platforms\SqlitePlatform::getListSequencesSQL ($database) : string

method Doctrine\DBAL\Platforms\SqlitePlatform::getListUsersSQL () : string

method Doctrine\DBAL\Platforms\SqlitePlatform::getDropSequenceSQL ($sequence) : string

Returns the SQL snippet to drop an existing sequence.

method Doctrine\DBAL\Platforms\SqlitePlatform::getSequenceNextValSQL ($sequenceName) : string

method Doctrine\DBAL\Platforms\SqlitePlatform::getCreateDatabaseSQL ($database) : string

Returns the SQL to create a new database.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDateTimeTzTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime with timezone offset fields.

method Doctrine\DBAL\Platforms\SqlitePlatform::getFloatDeclarationSQL ($fieldDeclaration) : string

method Doctrine\DBAL\Platforms\SqlitePlatform::getDefaultTransactionIsolationLevel () : int

Gets the default transaction isolation level of the platform.

method Doctrine\DBAL\Platforms\SqlitePlatform::supportsSequences () : bool

Whether the platform supports sequences.

method Doctrine\DBAL\Platforms\SqlitePlatform::usesSequenceEmulatedIdentityColumns () : bool

Whether the platform emulates identity columns through sequences.

Some platforms that do not support identity columns natively
but support sequences can emulate identity columns by using
sequences.

method Doctrine\DBAL\Platforms\SqlitePlatform::getIdentitySequenceName ($tableName, $columnName) : string

Returns the name of the sequence for a particular identity column in a particular table.

method Doctrine\DBAL\Platforms\SqlitePlatform::supportsIndexes () : bool

Whether the platform supports indexes.

method Doctrine\DBAL\Platforms\SqlitePlatform::supportsPartialIndexes () : bool

Whether the platform supports partial indexes.

method Doctrine\DBAL\Platforms\SqlitePlatform::supportsColumnLengthIndexes () : bool

Whether the platform supports indexes with column length definitions.

method Doctrine\DBAL\Platforms\SqlitePlatform::supportsAlterTable () : bool

Whether the platform supports altering tables.

method Doctrine\DBAL\Platforms\SqlitePlatform::supportsTransactions () : bool

Whether the platform supports transactions.

method Doctrine\DBAL\Platforms\SqlitePlatform::supportsSavepoints () : bool

Whether the platform supports savepoints.

method Doctrine\DBAL\Platforms\SqlitePlatform::supportsReleaseSavepoints () : bool

Whether the platform supports releasing savepoints.

method Doctrine\DBAL\Platforms\SqlitePlatform::supportsPrimaryConstraints () : bool

Whether the platform supports primary key constraints.

method Doctrine\DBAL\Platforms\SqlitePlatform::supportsForeignKeyOnUpdate () : bool

Whether this platform supports onUpdate in foreign key constraints.

method Doctrine\DBAL\Platforms\SqlitePlatform::supportsSchemas () : bool

Whether the platform supports database schemas.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDefaultSchemaName () : string

Returns the default schema name.

method Doctrine\DBAL\Platforms\SqlitePlatform::supportsCreateDropDatabase () : bool

Whether this platform supports create database.

Some databases don't allow to create and drop databases at all or only with certain tools.

method Doctrine\DBAL\Platforms\SqlitePlatform::supportsGettingAffectedRows () : bool

Whether the platform supports getting the affected rows of a recent update/delete type query.

method Doctrine\DBAL\Platforms\SqlitePlatform::supportsCommentOnStatement () : bool

Whether this platform support the proprietary syntax "COMMENT ON asset".

method Doctrine\DBAL\Platforms\SqlitePlatform::hasNativeGuidType () : bool

Does this platform have native guid type.

method Doctrine\DBAL\Platforms\SqlitePlatform::hasNativeJsonType () : bool

Does this platform have native JSON type.

method Doctrine\DBAL\Platforms\SqlitePlatform::getIdentityColumnNullInsertSQL () : void

method Doctrine\DBAL\Platforms\SqlitePlatform::supportsViews () : bool

Whether this platform supports views.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDateTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime value of this platform.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDateTimeTzFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime with timezone value of this platform.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDateFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored date value of this platform.

method Doctrine\DBAL\Platforms\SqlitePlatform::getTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored time value of this platform.

method Doctrine\DBAL\Platforms\SqlitePlatform::modifyLimitQuery ($query, $limit, $offset = null) : string

Adds an driver-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\SqlitePlatform::supportsLimitOffset () : bool

Whether the database platform support offsets in modify limit clauses.

method Doctrine\DBAL\Platforms\SqlitePlatform::getSQLResultCasing ($column) : string

Gets the character casing of a column in an SQL result set of this platform.

method Doctrine\DBAL\Platforms\SqlitePlatform::fixSchemaElementName ($schemaElementName) : string

Makes any fixes to a name of a schema element (table, sequence, ...) that are required
by restrictions of the platform, like a maximum length.

method Doctrine\DBAL\Platforms\SqlitePlatform::getMaxIdentifierLength () : int

Maximum length of any given database identifier, like tables or column names.

method Doctrine\DBAL\Platforms\SqlitePlatform::getEmptyIdentityInsertSQL ($tableName, $identifierColumnName) : string

Returns the insert SQL for an empty insert statement.

method Doctrine\DBAL\Platforms\SqlitePlatform::getDummySelectSQL () : string

This is for test reasons, many vendors have special requirements for dummy statements.

method Doctrine\DBAL\Platforms\SqlitePlatform::createSavePoint ($savepoint) : string

Returns the SQL to create a new savepoint.

method Doctrine\DBAL\Platforms\SqlitePlatform::releaseSavePoint ($savepoint) : string

Returns the SQL to release a savepoint.

method Doctrine\DBAL\Platforms\SqlitePlatform::rollbackSavePoint ($savepoint) : string

Returns the SQL to rollback a savepoint.

method Doctrine\DBAL\Platforms\SqlitePlatform::getReservedKeywordsList () : Doctrine\DBAL\Platforms\Keywords\KeywordList

Returns the keyword list instance of this platform.

method Doctrine\DBAL\Platforms\SqlitePlatform::quoteStringLiteral ($str) : string

Quotes a literal string.
This method is NOT meant to fix SQL injections!
It is only meant to escape this platform's string literal
quote character inside the given literal string.

method Doctrine\DBAL\Platforms\SqlitePlatform::getStringLiteralQuoteCharacter () : string

Gets the character used for string literal quoting.

method Doctrine\DBAL\Platforms\SqlitePlatform::escapeStringForLike ($inputString, $escapeChar) : string

Escapes metacharacters in a string intended to be used with a LIKE
operator.

method Doctrine\DBAL\Platforms\SqlitePlatform::getLikeWildcardCharacters () : string

class Doctrine\DBAL\Platforms::SQLServerPlatform

The SQLServerPlatform provides the behavior, features and SQL dialect of the
Microsoft SQL Server database platform.

classconstant integer Doctrine\DBAL\Platforms\SQLServerPlatform::CREATE_INDEXES

classconstant integer Doctrine\DBAL\Platforms\SQLServerPlatform::CREATE_FOREIGNKEYS

classconstant string Doctrine\DBAL\Platforms\SQLServerPlatform::DATE_INTERVAL_UNIT_SECOND

classconstant string Doctrine\DBAL\Platforms\SQLServerPlatform::DATE_INTERVAL_UNIT_MINUTE

classconstant string Doctrine\DBAL\Platforms\SQLServerPlatform::DATE_INTERVAL_UNIT_HOUR

classconstant string Doctrine\DBAL\Platforms\SQLServerPlatform::DATE_INTERVAL_UNIT_DAY

classconstant string Doctrine\DBAL\Platforms\SQLServerPlatform::DATE_INTERVAL_UNIT_WEEK

classconstant string Doctrine\DBAL\Platforms\SQLServerPlatform::DATE_INTERVAL_UNIT_MONTH

classconstant string Doctrine\DBAL\Platforms\SQLServerPlatform::DATE_INTERVAL_UNIT_QUARTER

classconstant string Doctrine\DBAL\Platforms\SQLServerPlatform::DATE_INTERVAL_UNIT_YEAR

classconstant integer Doctrine\DBAL\Platforms\SQLServerPlatform::TRIM_UNSPECIFIED

classconstant integer Doctrine\DBAL\Platforms\SQLServerPlatform::TRIM_LEADING

classconstant integer Doctrine\DBAL\Platforms\SQLServerPlatform::TRIM_TRAILING

classconstant integer Doctrine\DBAL\Platforms\SQLServerPlatform::TRIM_BOTH

property string[]null Doctrine\DBAL\Platforms\SQLServerPlatform::doctrineTypeMapping

property string[]null Doctrine\DBAL\Platforms\SQLServerPlatform::doctrineTypeComments

Contains a list of all columns that should generate parseable column comments for type-detection
in reverse engineering scenarios.

property Doctrine\Common\EventManager Doctrine\DBAL\Platforms\SQLServerPlatform::_eventManager

property Doctrine\DBAL\Platforms\Keywords\KeywordListnull Doctrine\DBAL\Platforms\SQLServerPlatform::_keywords

Holds the KeywordList instance for the current platform.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getCurrentDateSQL () : string

Returns the SQL specific for the platform to get the current date.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getCurrentTimeSQL () : string

Returns the SQL specific for the platform to get the current time.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDateArithmeticIntervalExpression ($date, $operator, $interval, $unit) : string

Returns the SQL for a date arithmetic expression.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDateDiffExpression ($date1, $date2) : string

Returns the SQL to calculate the difference in days between the two passed dates.

Computes diff = date1 - date2.

method Doctrine\DBAL\Platforms\SQLServerPlatform::prefersIdentityColumns () : bool

Whether the platform prefers identity columns (eg. autoincrement) for ID generation.
Subclasses should override this method to return TRUE if they prefer identity columns.

Microsoft SQL Server prefers "autoincrement" identity columns
since sequences can only be emulated with a table.

method Doctrine\DBAL\Platforms\SQLServerPlatform::supportsIdentityColumns () : bool

Whether the platform supports identity columns.

Identity columns are columns that receive an auto-generated value from the
database on insert of a row.

Microsoft SQL Server supports this through AUTO_INCREMENT columns.

method Doctrine\DBAL\Platforms\SQLServerPlatform::supportsReleaseSavepoints () : bool

Whether the platform supports releasing savepoints.

method Doctrine\DBAL\Platforms\SQLServerPlatform::supportsSchemas () : bool

Whether the platform supports database schemas.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDefaultSchemaName () : string

Returns the default schema name.

method Doctrine\DBAL\Platforms\SQLServerPlatform::supportsColumnCollation () : bool

Does this platform support column collation?

method Doctrine\DBAL\Platforms\SQLServerPlatform::hasNativeGuidType () : bool

Does this platform have native guid type.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getCreateDatabaseSQL ($name) : string

Returns the SQL to create a new database.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDropDatabaseSQL ($name) : string

Returns the SQL snippet to drop an existing database.

method Doctrine\DBAL\Platforms\SQLServerPlatform::supportsCreateDropDatabase () : bool

Whether this platform supports create database.

Some databases don't allow to create and drop databases at all or only with certain tools.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getCreateSchemaSQL ($schemaName) : string

Returns the SQL to create a named schema.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDropForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to drop a foreign key.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDropIndexSQL ($index, $table = null) : string

Returns the SQL to drop an index from a table.

method Doctrine\DBAL\Platforms\SQLServerPlatform::_getCreateTableSQL ($tableName, $columns, $options = []) : string[]

Returns the SQL used to create a table.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getCreatePrimaryKeySQL ($index, $table) : string

Returns the SQL to create an unnamed primary key constraint.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getCreateColumnCommentSQL ($tableName, $columnName, $comment) : string

Returns the SQL statement for creating a column comment.

SQL Server does not support native column comments,
therefore the extended properties functionality is used
as a workaround to store them.
The property name used to store column comments is "MS_Description"
which provides compatibility with SQL Server Management Studio,
as column comments are stored in the same property there when
specifying a column's "Description" attribute.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDefaultConstraintDeclarationSQL ($table, $column) : string

Returns the SQL snippet for declaring a default constraint.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getUniqueConstraintDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set a unique
constraint declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getCreateIndexSQL ($index, $table) : string

Returns the SQL to create an index on a table on this platform.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getCreateIndexSQLFlags ($index) : string

Adds additional flags for index generation.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getAlterTableSQL ($diff) : string[]

Gets the SQL statements for altering an existing table.

This method returns an array of SQL statements, since some platforms need several statements.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getAlterColumnCommentSQL ($tableName, $columnName, $comment) : string

Returns the SQL statement for altering a column comment.

SQL Server does not support native column comments,
therefore the extended properties functionality is used
as a workaround to store them.
The property name used to store column comments is "MS_Description"
which provides compatibility with SQL Server Management Studio,
as column comments are stored in the same property there when
specifying a column's "Description" attribute.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDropColumnCommentSQL ($tableName, $columnName) : string

Returns the SQL statement for dropping a column comment.

SQL Server does not support native column comments,
therefore the extended properties functionality is used
as a workaround to store them.
The property name used to store column comments is "MS_Description"
which provides compatibility with SQL Server Management Studio,
as column comments are stored in the same property there when
specifying a column's "Description" attribute.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getRenameIndexSQL ($oldIndexName, $index, $tableName) : string[]

Returns the SQL for renaming an index on a table.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getAddExtendedPropertySQL ($name, $value = null, $level0Type = null, $level0Name = null, $level1Type = null, $level1Name = null, $level2Type = null, $level2Name = null) : string

Returns the SQL statement for adding an extended property to a database object.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDropExtendedPropertySQL ($name, $level0Type = null, $level0Name = null, $level1Type = null, $level1Name = null, $level2Type = null, $level2Name = null) : string

Returns the SQL statement for dropping an extended property from a database object.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getUpdateExtendedPropertySQL ($name, $value = null, $level0Type = null, $level0Name = null, $level1Type = null, $level1Name = null, $level2Type = null, $level2Name = null) : string

Returns the SQL statement for updating an extended property of a database object.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getEmptyIdentityInsertSQL ($quotedTableName, $quotedIdentifierColumnName) : string

Returns the insert SQL for an empty insert statement.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getListTablesSQL () : string

method Doctrine\DBAL\Platforms\SQLServerPlatform::getListTableColumnsSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\SQLServerPlatform::getListTableForeignKeysSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\SQLServerPlatform::getListTableIndexesSQL ($table, $currentDatabase = null) : string

Returns the list of indexes for the current database.

The current database parameter is optional but will always be passed
when using the SchemaManager API and is the database the given table is in.

Attention: Some platforms only support currentDatabase when they
are connected with that database. Cross-database information schema
requests may be impossible.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getCreateViewSQL ($name, $sql) : string

method Doctrine\DBAL\Platforms\SQLServerPlatform::getListViewsSQL ($database) : string

Returns the SQL to list all views of a database or user.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDropViewSQL ($name) : string

method Doctrine\DBAL\Platforms\SQLServerPlatform::getGuidExpression () : string

Returns the global unique identifier expression.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getLocateExpression ($str, $substr, $startPos = false) : string

Returns the SQL snippet to get the position of the first occurrence of substring $substr in string $str.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getModExpression ($expression1, $expression2) : string

Returns the SQL snippet to get the remainder of the division operation $expression1 / $expression2.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getTrimExpression ($str, $pos = Doctrine\DBAL\Platforms\TrimMode::UNSPECIFIED, $char = false) : string

Returns the SQL snippet to trim a string.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getConcatExpression () : string

Returns a SQL snippet to concatenate the given expressions.

Accepts an arbitrary number of string parameters. Each parameter must contain an expression.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getListDatabasesSQL () : string

method Doctrine\DBAL\Platforms\SQLServerPlatform::getListNamespacesSQL () : string

Returns the SQL statement for retrieving the namespaces defined in the database.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getSubstringExpression ($value, $from, $length = null) : string

Returns a SQL snippet to get a substring inside an SQL statement.

Note: Not SQL92, but common functionality.

SQLite only supports the 2 parameter variant of this function.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getLengthExpression ($column) : string

Returns the SQL snippet to get the length of a text field.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getSetTransactionIsolationSQL ($level) : string

Returns the SQL to set the transaction isolation level.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getIntegerTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a 4 byte integer column.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getBigIntTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares an 8 byte integer column.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getSmallIntTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a 2 byte integer column.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getGuidTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a GUID/UUID field.

By default this maps directly to a CHAR(36) and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getVarcharTypeDeclarationSQLSnippet ($length, $fixed) : string

method Doctrine\DBAL\Platforms\SQLServerPlatform::getBinaryTypeDeclarationSQLSnippet ($length, $fixed) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getBinaryMaxLength () : int

Gets the maximum length of a binary field.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getClobTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a CLOB column type.

method Doctrine\DBAL\Platforms\SQLServerPlatform::_getCommonIntegerTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares common properties of an integer column.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDateTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime fields in
statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDateTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create date fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create time fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getBooleanTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a boolean column.

method Doctrine\DBAL\Platforms\SQLServerPlatform::doModifyLimitQuery ($query, $limit, $offset) : string

Adds an platform-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\SQLServerPlatform::supportsLimitOffset () : bool

Whether the database platform support offsets in modify limit clauses.

method Doctrine\DBAL\Platforms\SQLServerPlatform::convertBooleans ($item) : mixed

Some platforms need the boolean values to be converted.

The default conversion in this implementation converts to integers (false => 0, true => 1).

Note: if the input is not a boolean the original input might be returned.

There are two contexts when converting booleans: Literals and Prepared Statements.
This method should handle the literal case

method Doctrine\DBAL\Platforms\SQLServerPlatform::getCreateTemporaryTableSnippetSQL () : string

method Doctrine\DBAL\Platforms\SQLServerPlatform::getTemporaryTableName ($tableName) : string

Some vendors require temporary table names to be qualified specially.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDateTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime value of this platform.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDateFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored date value of this platform.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored time value of this platform.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDateTimeTzFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime with timezone value of this platform.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getName () : string

Gets the name of the platform.

method Doctrine\DBAL\Platforms\SQLServerPlatform::initializeDoctrineTypeMappings () : void

Lazy load Doctrine Type Mappings.

method Doctrine\DBAL\Platforms\SQLServerPlatform::createSavePoint ($savepoint) : string

Returns the SQL to create a new savepoint.

method Doctrine\DBAL\Platforms\SQLServerPlatform::releaseSavePoint ($savepoint) : string

Returns the SQL to release a savepoint.

method Doctrine\DBAL\Platforms\SQLServerPlatform::rollbackSavePoint ($savepoint) : string

Returns the SQL to rollback a savepoint.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getForeignKeyReferentialActionSQL ($action) : string

Returns the given referential action in uppercase if valid, otherwise throws an exception.

method Doctrine\DBAL\Platforms\SQLServerPlatform::appendLockHint ($fromClause, $lockMode) : string

Honors that some SQL vendors such as MsSql use table hints for locking instead of the ANSI SQL FOR UPDATE specification.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getForUpdateSQL () : string

Returns the FOR UPDATE expression.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getReservedKeywordsClass () : string

Returns the class name of the reserved keywords list.

method Doctrine\DBAL\Platforms\SQLServerPlatform::quoteSingleIdentifier ($str) : string

Quotes a single identifier (no dot chain separation).

method Doctrine\DBAL\Platforms\SQLServerPlatform::getTruncateTableSQL ($tableName, $cascade = false) : string

Generates a Truncate Table SQL statement for a given table.

Cascade is not supported on many platforms but would optionally cascade the truncate by
following the foreign keys.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getBlobTypeDeclarationSQL ($field) : string

Returns the SQL Snippet used to declare a BLOB column type.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getColumnDeclarationSQL ($name, $field) : string

Obtains DBMS specific SQL code portion needed to declare a generic type
field to be used in statements like CREATE TABLE.

Modifies column declaration order as it differs in Microsoft SQL Server.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getCommentOnTableSQL ($tableName, $comment) : string

method Doctrine\DBAL\Platforms\SQLServerPlatform::getListTableMetadataSQL ($table) : string

method Doctrine\DBAL\Platforms\SQLServerPlatform::__construct () : void

method Doctrine\DBAL\Platforms\SQLServerPlatform::setEventManager ($eventManager) : void

Sets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getEventManager () : Doctrine\Common\EventManager

Gets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getVarcharTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a VARCHAR column type.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getBinaryTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getJsonTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a JSON field.

By default this maps directly to a CLOB and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\SQLServerPlatform::registerDoctrineTypeMapping ($dbType, $doctrineType) : void

Registers a doctrine type to be used in conjunction with a column type of this platform.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDoctrineTypeMapping ($dbType) : string

Gets the Doctrine type that is mapped for the given database column type.

method Doctrine\DBAL\Platforms\SQLServerPlatform::hasDoctrineTypeMappingFor ($dbType) : bool

Checks if a database type is currently supported by this platform.

method Doctrine\DBAL\Platforms\SQLServerPlatform::initializeCommentedDoctrineTypes () : void

Initializes the Doctrine Type comments instance variable for in_array() checks.

method Doctrine\DBAL\Platforms\SQLServerPlatform::isCommentedDoctrineType ($doctrineType) : bool

Is it necessary for the platform to add a parsable type comment to allow reverse engineering the given type?

method Doctrine\DBAL\Platforms\SQLServerPlatform::markDoctrineTypeCommented ($doctrineType) : void

Marks this type as to be commented in ALTER TABLE and CREATE TABLE statements.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDoctrineTypeComment ($doctrineType) : string

Gets the comment to append to a column comment that helps parsing this type in reverse engineering.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getColumnComment ($column) : stringnull

Gets the comment of a passed column modified by potential doctrine type comment hints.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getIdentifierQuoteCharacter () : string

Gets the character used for identifier quoting.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getSqlCommentStartString () : string

Gets the string portion that starts an SQL comment.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getSqlCommentEndString () : string

Gets the string portion that ends an SQL comment.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getCharMaxLength () : int

Gets the maximum length of a char field.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getVarcharMaxLength () : int

Gets the maximum length of a varchar field.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getVarcharDefaultLength () : int

Gets the default length of a varchar field.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getBinaryDefaultLength () : int

Gets the default length of a binary field.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getWildcards () : string[]

Gets all SQL wildcard characters of the platform.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getRegexpExpression () : string

Returns the regular expression operator.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getAvgExpression ($column) : string

Returns the SQL snippet to get the average value of a column.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getCountExpression ($column) : string

Returns the SQL snippet to get the number of rows (without a NULL value) of a column.

If a '*' is used instead of a column the number of selected rows is returned.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getMaxExpression ($column) : string

Returns the SQL snippet to get the highest value of a column.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getMinExpression ($column) : string

Returns the SQL snippet to get the lowest value of a column.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getSumExpression ($column) : string

Returns the SQL snippet to get the total sum of a column.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getMd5Expression ($column) : string

Returns the SQL snippet to get the md5 sum of a field.

Note: Not SQL92, but common functionality.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getSqrtExpression ($column) : string

Returns the SQL snippet to get the squared value of a column.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getRoundExpression ($column, $decimals = 0) : string

Returns the SQL snippet to round a numeric field to the number of decimals specified.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getRtrimExpression ($str) : string

Returns the SQL snippet to trim trailing space characters from the expression.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getLtrimExpression ($str) : string

Returns the SQL snippet to trim leading space characters from the expression.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getUpperExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to uppercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getLowerExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to lowercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getNowExpression () : string

Returns the SQL snippet to get the current system date.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getNotExpression ($expression) : string

Returns the SQL for a logical not.

Example:

$q = new Doctrine_Query();
$e = $q->expr;
$q->select('*')->from('table')
->where($e->eq('id', $e->not('null'));

method Doctrine\DBAL\Platforms\SQLServerPlatform::getIsNullExpression ($expression) : string

Returns the SQL that checks if an expression is null.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getIsNotNullExpression ($expression) : string

Returns the SQL that checks if an expression is not null.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getBetweenExpression ($expression, $value1, $value2) : string

Returns the SQL that checks if an expression evaluates to a value between two values.

The parameter $expression is checked if it is between $value1 and $value2.

Note: There is a slight difference in the way BETWEEN works on some databases.
http://www.w3schools.com/sql/sql_between.asp. If you want complete database
independence you should avoid using between().

method Doctrine\DBAL\Platforms\SQLServerPlatform::getAcosExpression ($value) : string

Returns the SQL to get the arccosine of a value.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getSinExpression ($value) : string

Returns the SQL to get the sine of a value.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getPiExpression () : string

Returns the SQL to get the PI value.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getCosExpression ($value) : string

Returns the SQL to get the cosine of a value.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDateAddSecondsExpression ($date, $seconds) : string

Returns the SQL to add the number of given seconds to a date.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDateSubSecondsExpression ($date, $seconds) : string

Returns the SQL to subtract the number of given seconds from a date.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDateAddMinutesExpression ($date, $minutes) : string

Returns the SQL to add the number of given minutes to a date.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDateSubMinutesExpression ($date, $minutes) : string

Returns the SQL to subtract the number of given minutes from a date.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDateAddHourExpression ($date, $hours) : string

Returns the SQL to add the number of given hours to a date.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDateSubHourExpression ($date, $hours) : string

Returns the SQL to subtract the number of given hours to a date.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDateAddDaysExpression ($date, $days) : string

Returns the SQL to add the number of given days to a date.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDateSubDaysExpression ($date, $days) : string

Returns the SQL to subtract the number of given days to a date.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDateAddWeeksExpression ($date, $weeks) : string

Returns the SQL to add the number of given weeks to a date.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDateSubWeeksExpression ($date, $weeks) : string

Returns the SQL to subtract the number of given weeks from a date.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDateAddMonthExpression ($date, $months) : string

Returns the SQL to add the number of given months to a date.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDateSubMonthExpression ($date, $months) : string

Returns the SQL to subtract the number of given months to a date.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDateAddQuartersExpression ($date, $quarters) : string

Returns the SQL to add the number of given quarters to a date.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDateSubQuartersExpression ($date, $quarters) : string

Returns the SQL to subtract the number of given quarters from a date.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDateAddYearsExpression ($date, $years) : string

Returns the SQL to add the number of given years to a date.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDateSubYearsExpression ($date, $years) : string

Returns the SQL to subtract the number of given years from a date.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getBitAndComparisonExpression ($value1, $value2) : string

Returns the SQL bit AND comparison expression.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getBitOrComparisonExpression ($value1, $value2) : string

Returns the SQL bit OR comparison expression.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getReadLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which locks rows in shared read lock.

This defaults to the ANSI SQL "FOR UPDATE", which is an exclusive lock (Write). Some database
vendors allow to lighten this constraint up to be a real read lock.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getWriteLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which obtains an exclusive lock on the rows.

The semantics of this lock mode should equal the SELECT .. FOR UPDATE of the ANSI SQL standard.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDropTableSQL ($table) : string

Returns the SQL snippet to drop an existing table.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDropTemporaryTableSQL ($table) : string

Returns the SQL to safely drop a temporary table WITHOUT implicitly committing an open transaction.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDropConstraintSQL ($constraint, $table) : string

Returns the SQL to drop a constraint.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getCreateTableSQL ($table, $createFlags = self::CREATE_INDEXES) : string[]

Returns the SQL statement(s) to create a table with the specified name, columns and constraints
on this platform.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getCommentOnColumnSQL ($tableName, $columnName, $comment) : string

method Doctrine\DBAL\Platforms\SQLServerPlatform::getInlineColumnCommentSQL ($comment) : string

Returns the SQL to create inline comment on a column.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getCreateSequenceSQL ($sequence) : string

Returns the SQL to create a sequence on this platform.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getAlterSequenceSQL ($sequence) : string

Returns the SQL to change a sequence on this platform.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getCreateConstraintSQL ($constraint, $table) : string

Returns the SQL to create a constraint on a table on this platform.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getPartialIndexSQL ($index) : string

Adds condition for partial index.

method Doctrine\DBAL\Platforms\SQLServerPlatform::quoteIdentifier ($str) : string

Quotes a string so that it can be safely used as a table or column name,
even if it is a reserved word of the platform. This also detects identifier
chains separated by dot and quotes them independently.

NOTE: Just because you CAN use quoted identifiers doesn't mean
you SHOULD use them. In general, they end up causing way more
problems than they solve.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getCreateForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to create a new foreign key.

method Doctrine\DBAL\Platforms\SQLServerPlatform::onSchemaAlterTableAddColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SQLServerPlatform::onSchemaAlterTableRemoveColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SQLServerPlatform::onSchemaAlterTableChangeColumn ($columnDiff, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SQLServerPlatform::onSchemaAlterTableRenameColumn ($oldColumnName, $column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SQLServerPlatform::onSchemaAlterTable ($diff, &$sql) : bool

method Doctrine\DBAL\Platforms\SQLServerPlatform::getPreAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\SQLServerPlatform::getPostAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\SQLServerPlatform::_getAlterTableIndexForeignKeySQL ($diff) : string[]

Common code for alter table statement generation that updates the changed Index and Foreign Key definitions.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getColumnDeclarationListSQL ($fields) : string

Gets declaration of a number of fields in bulk.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDecimalTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a floating point column of arbitrary precision.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDefaultValueDeclarationSQL ($field) : string

Obtains DBMS specific SQL code portion needed to set a default value
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getCheckDeclarationSQL ($definition) : string

Obtains DBMS specific SQL code portion needed to set a CHECK constraint
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getIndexDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getCustomTypeDeclarationSQL ($columnDef) : string

Obtains SQL code portion needed to create a custom column,
e.g. when a field has the "columnDefinition" keyword.
Only "AUTOINCREMENT" and "PRIMARY KEY" are added if appropriate.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getIndexFieldDeclarationListSQL ($columnsOrIndex) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getTemporaryTableSQL () : string

Returns the required SQL string that fits between CREATE ... TABLE
to create the table as a temporary table.

Should be overridden in driver classes to return the correct string for the
specific database type.

The default is to return the string "TEMPORARY" - this will result in a
SQL error for any database that does not support temporary tables, or that
requires a different SQL command from "CREATE TEMPORARY TABLE".

method Doctrine\DBAL\Platforms\SQLServerPlatform::getForeignKeyDeclarationSQL ($foreignKey) : string

Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getAdvancedForeignKeyOptionsSQL ($foreignKey) : string

Returns the FOREIGN KEY query section dealing with non-standard options
as MATCH, INITIALLY DEFERRED, ON UPDATE, ...

method Doctrine\DBAL\Platforms\SQLServerPlatform::getForeignKeyBaseDeclarationSQL ($foreignKey) : string

Obtains DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getUniqueFieldDeclarationSQL () : string

Obtains DBMS specific SQL code portion needed to set the UNIQUE constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getColumnCharsetDeclarationSQL ($charset) : string

Obtains DBMS specific SQL code portion needed to set the CHARACTER SET
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getColumnCollationDeclarationSQL ($collation) : string

Obtains DBMS specific SQL code portion needed to set the COLLATION
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServerPlatform::prefersSequences () : bool

Whether the platform prefers sequences for ID generation.
Subclasses should override this method to return TRUE if they prefer sequences.

method Doctrine\DBAL\Platforms\SQLServerPlatform::convertFromBoolean ($item) : boolnull

Some platforms have boolean literals that needs to be correctly converted

The default conversion tries to convert value into bool "(bool)$item"

method Doctrine\DBAL\Platforms\SQLServerPlatform::convertBooleansToDatabaseValue ($item) : mixed

This method should handle the prepared statements case. When there is no
distinction, it's OK to use the same method.

Note: if the input is not a boolean the original input might be returned.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getCurrentTimestampSQL () : string

Returns the SQL specific for the platform to get the current timestamp

method Doctrine\DBAL\Platforms\SQLServerPlatform::_getTransactionIsolationLevelSQL ($level) : string

Returns the SQL for a given transaction isolation level Connection constant.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getListSequencesSQL ($database) : string

method Doctrine\DBAL\Platforms\SQLServerPlatform::getListTableConstraintsSQL ($table) : string

method Doctrine\DBAL\Platforms\SQLServerPlatform::getListUsersSQL () : string

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDropSequenceSQL ($sequence) : string

Returns the SQL snippet to drop an existing sequence.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getSequenceNextValSQL ($sequenceName) : string

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDateTimeTzTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime with timezone offset fields.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getFloatDeclarationSQL ($fieldDeclaration) : string

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDefaultTransactionIsolationLevel () : int

Gets the default transaction isolation level of the platform.

method Doctrine\DBAL\Platforms\SQLServerPlatform::supportsSequences () : bool

Whether the platform supports sequences.

method Doctrine\DBAL\Platforms\SQLServerPlatform::usesSequenceEmulatedIdentityColumns () : bool

Whether the platform emulates identity columns through sequences.

Some platforms that do not support identity columns natively
but support sequences can emulate identity columns by using
sequences.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getIdentitySequenceName ($tableName, $columnName) : string

Returns the name of the sequence for a particular identity column in a particular table.

method Doctrine\DBAL\Platforms\SQLServerPlatform::supportsIndexes () : bool

Whether the platform supports indexes.

method Doctrine\DBAL\Platforms\SQLServerPlatform::supportsPartialIndexes () : bool

Whether the platform supports partial indexes.

method Doctrine\DBAL\Platforms\SQLServerPlatform::supportsColumnLengthIndexes () : bool

Whether the platform supports indexes with column length definitions.

method Doctrine\DBAL\Platforms\SQLServerPlatform::supportsAlterTable () : bool

Whether the platform supports altering tables.

method Doctrine\DBAL\Platforms\SQLServerPlatform::supportsTransactions () : bool

Whether the platform supports transactions.

method Doctrine\DBAL\Platforms\SQLServerPlatform::supportsSavepoints () : bool

Whether the platform supports savepoints.

method Doctrine\DBAL\Platforms\SQLServerPlatform::supportsPrimaryConstraints () : bool

Whether the platform supports primary key constraints.

method Doctrine\DBAL\Platforms\SQLServerPlatform::supportsForeignKeyConstraints () : bool

Whether the platform supports foreign key constraints.

method Doctrine\DBAL\Platforms\SQLServerPlatform::supportsForeignKeyOnUpdate () : bool

Whether this platform supports onUpdate in foreign key constraints.

method Doctrine\DBAL\Platforms\SQLServerPlatform::canEmulateSchemas () : bool

Whether this platform can emulate schemas.

Platforms that either support or emulate schemas don't automatically
filter a schema for the namespaced elements in {@link
AbstractManager#createSchema}.

method Doctrine\DBAL\Platforms\SQLServerPlatform::supportsGettingAffectedRows () : bool

Whether the platform supports getting the affected rows of a recent update/delete type query.

method Doctrine\DBAL\Platforms\SQLServerPlatform::supportsInlineColumnComments () : bool

Whether this platform support to add inline column comments as postfix.

method Doctrine\DBAL\Platforms\SQLServerPlatform::supportsCommentOnStatement () : bool

Whether this platform support the proprietary syntax "COMMENT ON asset".

method Doctrine\DBAL\Platforms\SQLServerPlatform::hasNativeJsonType () : bool

Does this platform have native JSON type.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getIdentityColumnNullInsertSQL () : void

method Doctrine\DBAL\Platforms\SQLServerPlatform::supportsViews () : bool

Whether this platform supports views.

method Doctrine\DBAL\Platforms\SQLServerPlatform::modifyLimitQuery ($query, $limit, $offset = null) : string

Adds an driver-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getSQLResultCasing ($column) : string

Gets the character casing of a column in an SQL result set of this platform.

method Doctrine\DBAL\Platforms\SQLServerPlatform::fixSchemaElementName ($schemaElementName) : string

Makes any fixes to a name of a schema element (table, sequence, ...) that are required
by restrictions of the platform, like a maximum length.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getMaxIdentifierLength () : int

Maximum length of any given database identifier, like tables or column names.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getDummySelectSQL () : string

This is for test reasons, many vendors have special requirements for dummy statements.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getReservedKeywordsList () : Doctrine\DBAL\Platforms\Keywords\KeywordList

Returns the keyword list instance of this platform.

method Doctrine\DBAL\Platforms\SQLServerPlatform::quoteStringLiteral ($str) : string

Quotes a literal string.
This method is NOT meant to fix SQL injections!
It is only meant to escape this platform's string literal
quote character inside the given literal string.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getStringLiteralQuoteCharacter () : string

Gets the character used for string literal quoting.

method Doctrine\DBAL\Platforms\SQLServerPlatform::escapeStringForLike ($inputString, $escapeChar) : string

Escapes metacharacters in a string intended to be used with a LIKE
operator.

method Doctrine\DBAL\Platforms\SQLServerPlatform::getLikeWildcardCharacters () : string

class Doctrine\DBAL\Platforms::SQLServer2005Platform

Platform to ensure compatibility of Doctrine with Microsoft SQL Server 2005 version and
higher.

Differences to SQL Server 2008 are:

classconstant integer Doctrine\DBAL\Platforms\SQLServer2005Platform::CREATE_INDEXES

classconstant integer Doctrine\DBAL\Platforms\SQLServer2005Platform::CREATE_FOREIGNKEYS

classconstant string Doctrine\DBAL\Platforms\SQLServer2005Platform::DATE_INTERVAL_UNIT_SECOND

classconstant string Doctrine\DBAL\Platforms\SQLServer2005Platform::DATE_INTERVAL_UNIT_MINUTE

classconstant string Doctrine\DBAL\Platforms\SQLServer2005Platform::DATE_INTERVAL_UNIT_HOUR

classconstant string Doctrine\DBAL\Platforms\SQLServer2005Platform::DATE_INTERVAL_UNIT_DAY

classconstant string Doctrine\DBAL\Platforms\SQLServer2005Platform::DATE_INTERVAL_UNIT_WEEK

classconstant string Doctrine\DBAL\Platforms\SQLServer2005Platform::DATE_INTERVAL_UNIT_MONTH

classconstant string Doctrine\DBAL\Platforms\SQLServer2005Platform::DATE_INTERVAL_UNIT_QUARTER

classconstant string Doctrine\DBAL\Platforms\SQLServer2005Platform::DATE_INTERVAL_UNIT_YEAR

classconstant integer Doctrine\DBAL\Platforms\SQLServer2005Platform::TRIM_UNSPECIFIED

classconstant integer Doctrine\DBAL\Platforms\SQLServer2005Platform::TRIM_LEADING

classconstant integer Doctrine\DBAL\Platforms\SQLServer2005Platform::TRIM_TRAILING

classconstant integer Doctrine\DBAL\Platforms\SQLServer2005Platform::TRIM_BOTH

property string[]null Doctrine\DBAL\Platforms\SQLServer2005Platform::doctrineTypeMapping

property string[]null Doctrine\DBAL\Platforms\SQLServer2005Platform::doctrineTypeComments

Contains a list of all columns that should generate parseable column comments for type-detection
in reverse engineering scenarios.

property Doctrine\Common\EventManager Doctrine\DBAL\Platforms\SQLServer2005Platform::_eventManager

property Doctrine\DBAL\Platforms\Keywords\KeywordListnull Doctrine\DBAL\Platforms\SQLServer2005Platform::_keywords

Holds the KeywordList instance for the current platform.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::supportsLimitOffset () : bool

Whether the database platform support offsets in modify limit clauses.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getClobTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a CLOB column type.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getReservedKeywordsClass () : string

Returns the class name of the reserved keywords list.

Returns Microsoft SQL Server 2005 specific keywords class

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getCurrentDateSQL () : string

Returns the SQL specific for the platform to get the current date.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getCurrentTimeSQL () : string

Returns the SQL specific for the platform to get the current time.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDateArithmeticIntervalExpression ($date, $operator, $interval, $unit) : string

Returns the SQL for a date arithmetic expression.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDateDiffExpression ($date1, $date2) : string

Returns the SQL to calculate the difference in days between the two passed dates.

Computes diff = date1 - date2.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::prefersIdentityColumns () : bool

Whether the platform prefers identity columns (eg. autoincrement) for ID generation.
Subclasses should override this method to return TRUE if they prefer identity columns.

Microsoft SQL Server prefers "autoincrement" identity columns
since sequences can only be emulated with a table.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::supportsIdentityColumns () : bool

Whether the platform supports identity columns.

Identity columns are columns that receive an auto-generated value from the
database on insert of a row.

Microsoft SQL Server supports this through AUTO_INCREMENT columns.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::supportsReleaseSavepoints () : bool

Whether the platform supports releasing savepoints.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::supportsSchemas () : bool

Whether the platform supports database schemas.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDefaultSchemaName () : string

Returns the default schema name.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::supportsColumnCollation () : bool

Does this platform support column collation?

method Doctrine\DBAL\Platforms\SQLServer2005Platform::hasNativeGuidType () : bool

Does this platform have native guid type.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getCreateDatabaseSQL ($name) : string

Returns the SQL to create a new database.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDropDatabaseSQL ($name) : string

Returns the SQL snippet to drop an existing database.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::supportsCreateDropDatabase () : bool

Whether this platform supports create database.

Some databases don't allow to create and drop databases at all or only with certain tools.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getCreateSchemaSQL ($schemaName) : string

Returns the SQL to create a named schema.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDropForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to drop a foreign key.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDropIndexSQL ($index, $table = null) : string

Returns the SQL to drop an index from a table.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::_getCreateTableSQL ($tableName, $columns, $options = []) : string[]

Returns the SQL used to create a table.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getCreatePrimaryKeySQL ($index, $table) : string

Returns the SQL to create an unnamed primary key constraint.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getCreateColumnCommentSQL ($tableName, $columnName, $comment) : string

Returns the SQL statement for creating a column comment.

SQL Server does not support native column comments,
therefore the extended properties functionality is used
as a workaround to store them.
The property name used to store column comments is "MS_Description"
which provides compatibility with SQL Server Management Studio,
as column comments are stored in the same property there when
specifying a column's "Description" attribute.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDefaultConstraintDeclarationSQL ($table, $column) : string

Returns the SQL snippet for declaring a default constraint.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getUniqueConstraintDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set a unique
constraint declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getCreateIndexSQL ($index, $table) : string

Returns the SQL to create an index on a table on this platform.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getCreateIndexSQLFlags ($index) : string

Adds additional flags for index generation.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getAlterTableSQL ($diff) : string[]

Gets the SQL statements for altering an existing table.

This method returns an array of SQL statements, since some platforms need several statements.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getAlterColumnCommentSQL ($tableName, $columnName, $comment) : string

Returns the SQL statement for altering a column comment.

SQL Server does not support native column comments,
therefore the extended properties functionality is used
as a workaround to store them.
The property name used to store column comments is "MS_Description"
which provides compatibility with SQL Server Management Studio,
as column comments are stored in the same property there when
specifying a column's "Description" attribute.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDropColumnCommentSQL ($tableName, $columnName) : string

Returns the SQL statement for dropping a column comment.

SQL Server does not support native column comments,
therefore the extended properties functionality is used
as a workaround to store them.
The property name used to store column comments is "MS_Description"
which provides compatibility with SQL Server Management Studio,
as column comments are stored in the same property there when
specifying a column's "Description" attribute.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getRenameIndexSQL ($oldIndexName, $index, $tableName) : string[]

Returns the SQL for renaming an index on a table.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getAddExtendedPropertySQL ($name, $value = null, $level0Type = null, $level0Name = null, $level1Type = null, $level1Name = null, $level2Type = null, $level2Name = null) : string

Returns the SQL statement for adding an extended property to a database object.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDropExtendedPropertySQL ($name, $level0Type = null, $level0Name = null, $level1Type = null, $level1Name = null, $level2Type = null, $level2Name = null) : string

Returns the SQL statement for dropping an extended property from a database object.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getUpdateExtendedPropertySQL ($name, $value = null, $level0Type = null, $level0Name = null, $level1Type = null, $level1Name = null, $level2Type = null, $level2Name = null) : string

Returns the SQL statement for updating an extended property of a database object.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getEmptyIdentityInsertSQL ($quotedTableName, $quotedIdentifierColumnName) : string

Returns the insert SQL for an empty insert statement.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getListTablesSQL () : string

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getListTableColumnsSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getListTableForeignKeysSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getListTableIndexesSQL ($table, $currentDatabase = null) : string

Returns the list of indexes for the current database.

The current database parameter is optional but will always be passed
when using the SchemaManager API and is the database the given table is in.

Attention: Some platforms only support currentDatabase when they
are connected with that database. Cross-database information schema
requests may be impossible.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getCreateViewSQL ($name, $sql) : string

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getListViewsSQL ($database) : string

Returns the SQL to list all views of a database or user.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDropViewSQL ($name) : string

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getGuidExpression () : string

Returns the global unique identifier expression.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getLocateExpression ($str, $substr, $startPos = false) : string

Returns the SQL snippet to get the position of the first occurrence of substring $substr in string $str.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getModExpression ($expression1, $expression2) : string

Returns the SQL snippet to get the remainder of the division operation $expression1 / $expression2.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getTrimExpression ($str, $pos = Doctrine\DBAL\Platforms\TrimMode::UNSPECIFIED, $char = false) : string

Returns the SQL snippet to trim a string.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getConcatExpression () : string

Returns a SQL snippet to concatenate the given expressions.

Accepts an arbitrary number of string parameters. Each parameter must contain an expression.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getListDatabasesSQL () : string

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getListNamespacesSQL () : string

Returns the SQL statement for retrieving the namespaces defined in the database.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getSubstringExpression ($value, $from, $length = null) : string

Returns a SQL snippet to get a substring inside an SQL statement.

Note: Not SQL92, but common functionality.

SQLite only supports the 2 parameter variant of this function.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getLengthExpression ($column) : string

Returns the SQL snippet to get the length of a text field.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getSetTransactionIsolationSQL ($level) : string

Returns the SQL to set the transaction isolation level.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getIntegerTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a 4 byte integer column.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getBigIntTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares an 8 byte integer column.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getSmallIntTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a 2 byte integer column.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getGuidTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a GUID/UUID field.

By default this maps directly to a CHAR(36) and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getVarcharTypeDeclarationSQLSnippet ($length, $fixed) : string

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getBinaryTypeDeclarationSQLSnippet ($length, $fixed) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getBinaryMaxLength () : int

Gets the maximum length of a binary field.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::_getCommonIntegerTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares common properties of an integer column.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDateTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime fields in
statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDateTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create date fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create time fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getBooleanTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a boolean column.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::doModifyLimitQuery ($query, $limit, $offset) : string

Adds an platform-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::convertBooleans ($item) : mixed

Some platforms need the boolean values to be converted.

The default conversion in this implementation converts to integers (false => 0, true => 1).

Note: if the input is not a boolean the original input might be returned.

There are two contexts when converting booleans: Literals and Prepared Statements.
This method should handle the literal case

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getCreateTemporaryTableSnippetSQL () : string

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getTemporaryTableName ($tableName) : string

Some vendors require temporary table names to be qualified specially.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDateTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime value of this platform.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDateFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored date value of this platform.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored time value of this platform.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDateTimeTzFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime with timezone value of this platform.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getName () : string

Gets the name of the platform.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::initializeDoctrineTypeMappings () : void

Lazy load Doctrine Type Mappings.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::createSavePoint ($savepoint) : string

Returns the SQL to create a new savepoint.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::releaseSavePoint ($savepoint) : string

Returns the SQL to release a savepoint.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::rollbackSavePoint ($savepoint) : string

Returns the SQL to rollback a savepoint.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getForeignKeyReferentialActionSQL ($action) : string

Returns the given referential action in uppercase if valid, otherwise throws an exception.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::appendLockHint ($fromClause, $lockMode) : string

Honors that some SQL vendors such as MsSql use table hints for locking instead of the ANSI SQL FOR UPDATE specification.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getForUpdateSQL () : string

Returns the FOR UPDATE expression.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::quoteSingleIdentifier ($str) : string

Quotes a single identifier (no dot chain separation).

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getTruncateTableSQL ($tableName, $cascade = false) : string

Generates a Truncate Table SQL statement for a given table.

Cascade is not supported on many platforms but would optionally cascade the truncate by
following the foreign keys.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getBlobTypeDeclarationSQL ($field) : string

Returns the SQL Snippet used to declare a BLOB column type.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getColumnDeclarationSQL ($name, $field) : string

Obtains DBMS specific SQL code portion needed to declare a generic type
field to be used in statements like CREATE TABLE.

Modifies column declaration order as it differs in Microsoft SQL Server.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getCommentOnTableSQL ($tableName, $comment) : string

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getListTableMetadataSQL ($table) : string

method Doctrine\DBAL\Platforms\SQLServer2005Platform::__construct () : void

method Doctrine\DBAL\Platforms\SQLServer2005Platform::setEventManager ($eventManager) : void

Sets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getEventManager () : Doctrine\Common\EventManager

Gets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getVarcharTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a VARCHAR column type.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getBinaryTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getJsonTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a JSON field.

By default this maps directly to a CLOB and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::registerDoctrineTypeMapping ($dbType, $doctrineType) : void

Registers a doctrine type to be used in conjunction with a column type of this platform.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDoctrineTypeMapping ($dbType) : string

Gets the Doctrine type that is mapped for the given database column type.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::hasDoctrineTypeMappingFor ($dbType) : bool

Checks if a database type is currently supported by this platform.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::initializeCommentedDoctrineTypes () : void

Initializes the Doctrine Type comments instance variable for in_array() checks.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::isCommentedDoctrineType ($doctrineType) : bool

Is it necessary for the platform to add a parsable type comment to allow reverse engineering the given type?

method Doctrine\DBAL\Platforms\SQLServer2005Platform::markDoctrineTypeCommented ($doctrineType) : void

Marks this type as to be commented in ALTER TABLE and CREATE TABLE statements.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDoctrineTypeComment ($doctrineType) : string

Gets the comment to append to a column comment that helps parsing this type in reverse engineering.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getColumnComment ($column) : stringnull

Gets the comment of a passed column modified by potential doctrine type comment hints.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getIdentifierQuoteCharacter () : string

Gets the character used for identifier quoting.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getSqlCommentStartString () : string

Gets the string portion that starts an SQL comment.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getSqlCommentEndString () : string

Gets the string portion that ends an SQL comment.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getCharMaxLength () : int

Gets the maximum length of a char field.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getVarcharMaxLength () : int

Gets the maximum length of a varchar field.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getVarcharDefaultLength () : int

Gets the default length of a varchar field.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getBinaryDefaultLength () : int

Gets the default length of a binary field.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getWildcards () : string[]

Gets all SQL wildcard characters of the platform.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getRegexpExpression () : string

Returns the regular expression operator.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getAvgExpression ($column) : string

Returns the SQL snippet to get the average value of a column.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getCountExpression ($column) : string

Returns the SQL snippet to get the number of rows (without a NULL value) of a column.

If a '*' is used instead of a column the number of selected rows is returned.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getMaxExpression ($column) : string

Returns the SQL snippet to get the highest value of a column.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getMinExpression ($column) : string

Returns the SQL snippet to get the lowest value of a column.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getSumExpression ($column) : string

Returns the SQL snippet to get the total sum of a column.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getMd5Expression ($column) : string

Returns the SQL snippet to get the md5 sum of a field.

Note: Not SQL92, but common functionality.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getSqrtExpression ($column) : string

Returns the SQL snippet to get the squared value of a column.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getRoundExpression ($column, $decimals = 0) : string

Returns the SQL snippet to round a numeric field to the number of decimals specified.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getRtrimExpression ($str) : string

Returns the SQL snippet to trim trailing space characters from the expression.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getLtrimExpression ($str) : string

Returns the SQL snippet to trim leading space characters from the expression.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getUpperExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to uppercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getLowerExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to lowercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getNowExpression () : string

Returns the SQL snippet to get the current system date.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getNotExpression ($expression) : string

Returns the SQL for a logical not.

Example:

$q = new Doctrine_Query();
$e = $q->expr;
$q->select('*')->from('table')
->where($e->eq('id', $e->not('null'));

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getIsNullExpression ($expression) : string

Returns the SQL that checks if an expression is null.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getIsNotNullExpression ($expression) : string

Returns the SQL that checks if an expression is not null.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getBetweenExpression ($expression, $value1, $value2) : string

Returns the SQL that checks if an expression evaluates to a value between two values.

The parameter $expression is checked if it is between $value1 and $value2.

Note: There is a slight difference in the way BETWEEN works on some databases.
http://www.w3schools.com/sql/sql_between.asp. If you want complete database
independence you should avoid using between().

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getAcosExpression ($value) : string

Returns the SQL to get the arccosine of a value.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getSinExpression ($value) : string

Returns the SQL to get the sine of a value.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getPiExpression () : string

Returns the SQL to get the PI value.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getCosExpression ($value) : string

Returns the SQL to get the cosine of a value.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDateAddSecondsExpression ($date, $seconds) : string

Returns the SQL to add the number of given seconds to a date.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDateSubSecondsExpression ($date, $seconds) : string

Returns the SQL to subtract the number of given seconds from a date.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDateAddMinutesExpression ($date, $minutes) : string

Returns the SQL to add the number of given minutes to a date.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDateSubMinutesExpression ($date, $minutes) : string

Returns the SQL to subtract the number of given minutes from a date.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDateAddHourExpression ($date, $hours) : string

Returns the SQL to add the number of given hours to a date.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDateSubHourExpression ($date, $hours) : string

Returns the SQL to subtract the number of given hours to a date.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDateAddDaysExpression ($date, $days) : string

Returns the SQL to add the number of given days to a date.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDateSubDaysExpression ($date, $days) : string

Returns the SQL to subtract the number of given days to a date.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDateAddWeeksExpression ($date, $weeks) : string

Returns the SQL to add the number of given weeks to a date.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDateSubWeeksExpression ($date, $weeks) : string

Returns the SQL to subtract the number of given weeks from a date.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDateAddMonthExpression ($date, $months) : string

Returns the SQL to add the number of given months to a date.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDateSubMonthExpression ($date, $months) : string

Returns the SQL to subtract the number of given months to a date.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDateAddQuartersExpression ($date, $quarters) : string

Returns the SQL to add the number of given quarters to a date.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDateSubQuartersExpression ($date, $quarters) : string

Returns the SQL to subtract the number of given quarters from a date.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDateAddYearsExpression ($date, $years) : string

Returns the SQL to add the number of given years to a date.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDateSubYearsExpression ($date, $years) : string

Returns the SQL to subtract the number of given years from a date.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getBitAndComparisonExpression ($value1, $value2) : string

Returns the SQL bit AND comparison expression.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getBitOrComparisonExpression ($value1, $value2) : string

Returns the SQL bit OR comparison expression.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getReadLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which locks rows in shared read lock.

This defaults to the ANSI SQL "FOR UPDATE", which is an exclusive lock (Write). Some database
vendors allow to lighten this constraint up to be a real read lock.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getWriteLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which obtains an exclusive lock on the rows.

The semantics of this lock mode should equal the SELECT .. FOR UPDATE of the ANSI SQL standard.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDropTableSQL ($table) : string

Returns the SQL snippet to drop an existing table.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDropTemporaryTableSQL ($table) : string

Returns the SQL to safely drop a temporary table WITHOUT implicitly committing an open transaction.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDropConstraintSQL ($constraint, $table) : string

Returns the SQL to drop a constraint.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getCreateTableSQL ($table, $createFlags = self::CREATE_INDEXES) : string[]

Returns the SQL statement(s) to create a table with the specified name, columns and constraints
on this platform.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getCommentOnColumnSQL ($tableName, $columnName, $comment) : string

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getInlineColumnCommentSQL ($comment) : string

Returns the SQL to create inline comment on a column.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getCreateSequenceSQL ($sequence) : string

Returns the SQL to create a sequence on this platform.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getAlterSequenceSQL ($sequence) : string

Returns the SQL to change a sequence on this platform.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getCreateConstraintSQL ($constraint, $table) : string

Returns the SQL to create a constraint on a table on this platform.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getPartialIndexSQL ($index) : string

Adds condition for partial index.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::quoteIdentifier ($str) : string

Quotes a string so that it can be safely used as a table or column name,
even if it is a reserved word of the platform. This also detects identifier
chains separated by dot and quotes them independently.

NOTE: Just because you CAN use quoted identifiers doesn't mean
you SHOULD use them. In general, they end up causing way more
problems than they solve.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getCreateForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to create a new foreign key.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::onSchemaAlterTableAddColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SQLServer2005Platform::onSchemaAlterTableRemoveColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SQLServer2005Platform::onSchemaAlterTableChangeColumn ($columnDiff, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SQLServer2005Platform::onSchemaAlterTableRenameColumn ($oldColumnName, $column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SQLServer2005Platform::onSchemaAlterTable ($diff, &$sql) : bool

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getPreAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getPostAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\SQLServer2005Platform::_getAlterTableIndexForeignKeySQL ($diff) : string[]

Common code for alter table statement generation that updates the changed Index and Foreign Key definitions.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getColumnDeclarationListSQL ($fields) : string

Gets declaration of a number of fields in bulk.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDecimalTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a floating point column of arbitrary precision.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDefaultValueDeclarationSQL ($field) : string

Obtains DBMS specific SQL code portion needed to set a default value
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getCheckDeclarationSQL ($definition) : string

Obtains DBMS specific SQL code portion needed to set a CHECK constraint
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getIndexDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getCustomTypeDeclarationSQL ($columnDef) : string

Obtains SQL code portion needed to create a custom column,
e.g. when a field has the "columnDefinition" keyword.
Only "AUTOINCREMENT" and "PRIMARY KEY" are added if appropriate.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getIndexFieldDeclarationListSQL ($columnsOrIndex) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getTemporaryTableSQL () : string

Returns the required SQL string that fits between CREATE ... TABLE
to create the table as a temporary table.

Should be overridden in driver classes to return the correct string for the
specific database type.

The default is to return the string "TEMPORARY" - this will result in a
SQL error for any database that does not support temporary tables, or that
requires a different SQL command from "CREATE TEMPORARY TABLE".

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getForeignKeyDeclarationSQL ($foreignKey) : string

Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getAdvancedForeignKeyOptionsSQL ($foreignKey) : string

Returns the FOREIGN KEY query section dealing with non-standard options
as MATCH, INITIALLY DEFERRED, ON UPDATE, ...

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getForeignKeyBaseDeclarationSQL ($foreignKey) : string

Obtains DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getUniqueFieldDeclarationSQL () : string

Obtains DBMS specific SQL code portion needed to set the UNIQUE constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getColumnCharsetDeclarationSQL ($charset) : string

Obtains DBMS specific SQL code portion needed to set the CHARACTER SET
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getColumnCollationDeclarationSQL ($collation) : string

Obtains DBMS specific SQL code portion needed to set the COLLATION
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::prefersSequences () : bool

Whether the platform prefers sequences for ID generation.
Subclasses should override this method to return TRUE if they prefer sequences.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::convertFromBoolean ($item) : boolnull

Some platforms have boolean literals that needs to be correctly converted

The default conversion tries to convert value into bool "(bool)$item"

method Doctrine\DBAL\Platforms\SQLServer2005Platform::convertBooleansToDatabaseValue ($item) : mixed

This method should handle the prepared statements case. When there is no
distinction, it's OK to use the same method.

Note: if the input is not a boolean the original input might be returned.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getCurrentTimestampSQL () : string

Returns the SQL specific for the platform to get the current timestamp

method Doctrine\DBAL\Platforms\SQLServer2005Platform::_getTransactionIsolationLevelSQL ($level) : string

Returns the SQL for a given transaction isolation level Connection constant.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getListSequencesSQL ($database) : string

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getListTableConstraintsSQL ($table) : string

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getListUsersSQL () : string

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDropSequenceSQL ($sequence) : string

Returns the SQL snippet to drop an existing sequence.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getSequenceNextValSQL ($sequenceName) : string

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDateTimeTzTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime with timezone offset fields.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getFloatDeclarationSQL ($fieldDeclaration) : string

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDefaultTransactionIsolationLevel () : int

Gets the default transaction isolation level of the platform.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::supportsSequences () : bool

Whether the platform supports sequences.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::usesSequenceEmulatedIdentityColumns () : bool

Whether the platform emulates identity columns through sequences.

Some platforms that do not support identity columns natively
but support sequences can emulate identity columns by using
sequences.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getIdentitySequenceName ($tableName, $columnName) : string

Returns the name of the sequence for a particular identity column in a particular table.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::supportsIndexes () : bool

Whether the platform supports indexes.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::supportsPartialIndexes () : bool

Whether the platform supports partial indexes.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::supportsColumnLengthIndexes () : bool

Whether the platform supports indexes with column length definitions.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::supportsAlterTable () : bool

Whether the platform supports altering tables.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::supportsTransactions () : bool

Whether the platform supports transactions.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::supportsSavepoints () : bool

Whether the platform supports savepoints.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::supportsPrimaryConstraints () : bool

Whether the platform supports primary key constraints.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::supportsForeignKeyConstraints () : bool

Whether the platform supports foreign key constraints.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::supportsForeignKeyOnUpdate () : bool

Whether this platform supports onUpdate in foreign key constraints.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::canEmulateSchemas () : bool

Whether this platform can emulate schemas.

Platforms that either support or emulate schemas don't automatically
filter a schema for the namespaced elements in {@link
AbstractManager#createSchema}.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::supportsGettingAffectedRows () : bool

Whether the platform supports getting the affected rows of a recent update/delete type query.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::supportsInlineColumnComments () : bool

Whether this platform support to add inline column comments as postfix.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::supportsCommentOnStatement () : bool

Whether this platform support the proprietary syntax "COMMENT ON asset".

method Doctrine\DBAL\Platforms\SQLServer2005Platform::hasNativeJsonType () : bool

Does this platform have native JSON type.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getIdentityColumnNullInsertSQL () : void

method Doctrine\DBAL\Platforms\SQLServer2005Platform::supportsViews () : bool

Whether this platform supports views.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::modifyLimitQuery ($query, $limit, $offset = null) : string

Adds an driver-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getSQLResultCasing ($column) : string

Gets the character casing of a column in an SQL result set of this platform.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::fixSchemaElementName ($schemaElementName) : string

Makes any fixes to a name of a schema element (table, sequence, ...) that are required
by restrictions of the platform, like a maximum length.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getMaxIdentifierLength () : int

Maximum length of any given database identifier, like tables or column names.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getDummySelectSQL () : string

This is for test reasons, many vendors have special requirements for dummy statements.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getReservedKeywordsList () : Doctrine\DBAL\Platforms\Keywords\KeywordList

Returns the keyword list instance of this platform.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::quoteStringLiteral ($str) : string

Quotes a literal string.
This method is NOT meant to fix SQL injections!
It is only meant to escape this platform's string literal
quote character inside the given literal string.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getStringLiteralQuoteCharacter () : string

Gets the character used for string literal quoting.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::escapeStringForLike ($inputString, $escapeChar) : string

Escapes metacharacters in a string intended to be used with a LIKE
operator.

method Doctrine\DBAL\Platforms\SQLServer2005Platform::getLikeWildcardCharacters () : string

class Doctrine\DBAL\Platforms::SQLServer2008Platform

Platform to ensure compatibility of Doctrine with Microsoft SQL Server 2008 version.

Differences to SQL Server 2005 and before are that a new DATETIME2 type was
introduced that has a higher precision.

classconstant integer Doctrine\DBAL\Platforms\SQLServer2008Platform::CREATE_INDEXES

classconstant integer Doctrine\DBAL\Platforms\SQLServer2008Platform::CREATE_FOREIGNKEYS

classconstant string Doctrine\DBAL\Platforms\SQLServer2008Platform::DATE_INTERVAL_UNIT_SECOND

classconstant string Doctrine\DBAL\Platforms\SQLServer2008Platform::DATE_INTERVAL_UNIT_MINUTE

classconstant string Doctrine\DBAL\Platforms\SQLServer2008Platform::DATE_INTERVAL_UNIT_HOUR

classconstant string Doctrine\DBAL\Platforms\SQLServer2008Platform::DATE_INTERVAL_UNIT_DAY

classconstant string Doctrine\DBAL\Platforms\SQLServer2008Platform::DATE_INTERVAL_UNIT_WEEK

classconstant string Doctrine\DBAL\Platforms\SQLServer2008Platform::DATE_INTERVAL_UNIT_MONTH

classconstant string Doctrine\DBAL\Platforms\SQLServer2008Platform::DATE_INTERVAL_UNIT_QUARTER

classconstant string Doctrine\DBAL\Platforms\SQLServer2008Platform::DATE_INTERVAL_UNIT_YEAR

classconstant integer Doctrine\DBAL\Platforms\SQLServer2008Platform::TRIM_UNSPECIFIED

classconstant integer Doctrine\DBAL\Platforms\SQLServer2008Platform::TRIM_LEADING

classconstant integer Doctrine\DBAL\Platforms\SQLServer2008Platform::TRIM_TRAILING

classconstant integer Doctrine\DBAL\Platforms\SQLServer2008Platform::TRIM_BOTH

property string[]null Doctrine\DBAL\Platforms\SQLServer2008Platform::doctrineTypeMapping

property string[]null Doctrine\DBAL\Platforms\SQLServer2008Platform::doctrineTypeComments

Contains a list of all columns that should generate parseable column comments for type-detection
in reverse engineering scenarios.

property Doctrine\Common\EventManager Doctrine\DBAL\Platforms\SQLServer2008Platform::_eventManager

property Doctrine\DBAL\Platforms\Keywords\KeywordListnull Doctrine\DBAL\Platforms\SQLServer2008Platform::_keywords

Holds the KeywordList instance for the current platform.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getListTablesSQL () : string

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDateTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime fields in
statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDateTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create date fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create time fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDateTimeTzTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime with timezone offset fields.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDateTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime value of this platform.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDateTimeTzFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime with timezone value of this platform.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDateFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored date value of this platform.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored time value of this platform.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::initializeDoctrineTypeMappings () : void

Lazy load Doctrine Type Mappings.

Adding Datetime2 Type

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getReservedKeywordsClass () : string

Returns the class name of the reserved keywords list.

Returns Microsoft SQL Server 2008 specific keywords class

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getLikeWildcardCharacters () : string

method Doctrine\DBAL\Platforms\SQLServer2008Platform::supportsLimitOffset () : bool

Whether the database platform support offsets in modify limit clauses.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getClobTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a CLOB column type.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getCurrentDateSQL () : string

Returns the SQL specific for the platform to get the current date.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getCurrentTimeSQL () : string

Returns the SQL specific for the platform to get the current time.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDateArithmeticIntervalExpression ($date, $operator, $interval, $unit) : string

Returns the SQL for a date arithmetic expression.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDateDiffExpression ($date1, $date2) : string

Returns the SQL to calculate the difference in days between the two passed dates.

Computes diff = date1 - date2.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::prefersIdentityColumns () : bool

Whether the platform prefers identity columns (eg. autoincrement) for ID generation.
Subclasses should override this method to return TRUE if they prefer identity columns.

Microsoft SQL Server prefers "autoincrement" identity columns
since sequences can only be emulated with a table.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::supportsIdentityColumns () : bool

Whether the platform supports identity columns.

Identity columns are columns that receive an auto-generated value from the
database on insert of a row.

Microsoft SQL Server supports this through AUTO_INCREMENT columns.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::supportsReleaseSavepoints () : bool

Whether the platform supports releasing savepoints.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::supportsSchemas () : bool

Whether the platform supports database schemas.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDefaultSchemaName () : string

Returns the default schema name.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::supportsColumnCollation () : bool

Does this platform support column collation?

method Doctrine\DBAL\Platforms\SQLServer2008Platform::hasNativeGuidType () : bool

Does this platform have native guid type.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getCreateDatabaseSQL ($name) : string

Returns the SQL to create a new database.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDropDatabaseSQL ($name) : string

Returns the SQL snippet to drop an existing database.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::supportsCreateDropDatabase () : bool

Whether this platform supports create database.

Some databases don't allow to create and drop databases at all or only with certain tools.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getCreateSchemaSQL ($schemaName) : string

Returns the SQL to create a named schema.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDropForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to drop a foreign key.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDropIndexSQL ($index, $table = null) : string

Returns the SQL to drop an index from a table.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::_getCreateTableSQL ($tableName, $columns, $options = []) : string[]

Returns the SQL used to create a table.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getCreatePrimaryKeySQL ($index, $table) : string

Returns the SQL to create an unnamed primary key constraint.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getCreateColumnCommentSQL ($tableName, $columnName, $comment) : string

Returns the SQL statement for creating a column comment.

SQL Server does not support native column comments,
therefore the extended properties functionality is used
as a workaround to store them.
The property name used to store column comments is "MS_Description"
which provides compatibility with SQL Server Management Studio,
as column comments are stored in the same property there when
specifying a column's "Description" attribute.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDefaultConstraintDeclarationSQL ($table, $column) : string

Returns the SQL snippet for declaring a default constraint.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getUniqueConstraintDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set a unique
constraint declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getCreateIndexSQL ($index, $table) : string

Returns the SQL to create an index on a table on this platform.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getCreateIndexSQLFlags ($index) : string

Adds additional flags for index generation.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getAlterTableSQL ($diff) : string[]

Gets the SQL statements for altering an existing table.

This method returns an array of SQL statements, since some platforms need several statements.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getAlterColumnCommentSQL ($tableName, $columnName, $comment) : string

Returns the SQL statement for altering a column comment.

SQL Server does not support native column comments,
therefore the extended properties functionality is used
as a workaround to store them.
The property name used to store column comments is "MS_Description"
which provides compatibility with SQL Server Management Studio,
as column comments are stored in the same property there when
specifying a column's "Description" attribute.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDropColumnCommentSQL ($tableName, $columnName) : string

Returns the SQL statement for dropping a column comment.

SQL Server does not support native column comments,
therefore the extended properties functionality is used
as a workaround to store them.
The property name used to store column comments is "MS_Description"
which provides compatibility with SQL Server Management Studio,
as column comments are stored in the same property there when
specifying a column's "Description" attribute.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getRenameIndexSQL ($oldIndexName, $index, $tableName) : string[]

Returns the SQL for renaming an index on a table.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getAddExtendedPropertySQL ($name, $value = null, $level0Type = null, $level0Name = null, $level1Type = null, $level1Name = null, $level2Type = null, $level2Name = null) : string

Returns the SQL statement for adding an extended property to a database object.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDropExtendedPropertySQL ($name, $level0Type = null, $level0Name = null, $level1Type = null, $level1Name = null, $level2Type = null, $level2Name = null) : string

Returns the SQL statement for dropping an extended property from a database object.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getUpdateExtendedPropertySQL ($name, $value = null, $level0Type = null, $level0Name = null, $level1Type = null, $level1Name = null, $level2Type = null, $level2Name = null) : string

Returns the SQL statement for updating an extended property of a database object.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getEmptyIdentityInsertSQL ($quotedTableName, $quotedIdentifierColumnName) : string

Returns the insert SQL for an empty insert statement.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getListTableColumnsSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getListTableForeignKeysSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getListTableIndexesSQL ($table, $currentDatabase = null) : string

Returns the list of indexes for the current database.

The current database parameter is optional but will always be passed
when using the SchemaManager API and is the database the given table is in.

Attention: Some platforms only support currentDatabase when they
are connected with that database. Cross-database information schema
requests may be impossible.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getCreateViewSQL ($name, $sql) : string

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getListViewsSQL ($database) : string

Returns the SQL to list all views of a database or user.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDropViewSQL ($name) : string

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getGuidExpression () : string

Returns the global unique identifier expression.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getLocateExpression ($str, $substr, $startPos = false) : string

Returns the SQL snippet to get the position of the first occurrence of substring $substr in string $str.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getModExpression ($expression1, $expression2) : string

Returns the SQL snippet to get the remainder of the division operation $expression1 / $expression2.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getTrimExpression ($str, $pos = Doctrine\DBAL\Platforms\TrimMode::UNSPECIFIED, $char = false) : string

Returns the SQL snippet to trim a string.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getConcatExpression () : string

Returns a SQL snippet to concatenate the given expressions.

Accepts an arbitrary number of string parameters. Each parameter must contain an expression.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getListDatabasesSQL () : string

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getListNamespacesSQL () : string

Returns the SQL statement for retrieving the namespaces defined in the database.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getSubstringExpression ($value, $from, $length = null) : string

Returns a SQL snippet to get a substring inside an SQL statement.

Note: Not SQL92, but common functionality.

SQLite only supports the 2 parameter variant of this function.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getLengthExpression ($column) : string

Returns the SQL snippet to get the length of a text field.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getSetTransactionIsolationSQL ($level) : string

Returns the SQL to set the transaction isolation level.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getIntegerTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a 4 byte integer column.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getBigIntTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares an 8 byte integer column.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getSmallIntTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a 2 byte integer column.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getGuidTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a GUID/UUID field.

By default this maps directly to a CHAR(36) and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getVarcharTypeDeclarationSQLSnippet ($length, $fixed) : string

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getBinaryTypeDeclarationSQLSnippet ($length, $fixed) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getBinaryMaxLength () : int

Gets the maximum length of a binary field.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::_getCommonIntegerTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares common properties of an integer column.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getBooleanTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a boolean column.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::doModifyLimitQuery ($query, $limit, $offset) : string

Adds an platform-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::convertBooleans ($item) : mixed

Some platforms need the boolean values to be converted.

The default conversion in this implementation converts to integers (false => 0, true => 1).

Note: if the input is not a boolean the original input might be returned.

There are two contexts when converting booleans: Literals and Prepared Statements.
This method should handle the literal case

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getCreateTemporaryTableSnippetSQL () : string

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getTemporaryTableName ($tableName) : string

Some vendors require temporary table names to be qualified specially.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getName () : string

Gets the name of the platform.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::createSavePoint ($savepoint) : string

Returns the SQL to create a new savepoint.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::releaseSavePoint ($savepoint) : string

Returns the SQL to release a savepoint.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::rollbackSavePoint ($savepoint) : string

Returns the SQL to rollback a savepoint.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getForeignKeyReferentialActionSQL ($action) : string

Returns the given referential action in uppercase if valid, otherwise throws an exception.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::appendLockHint ($fromClause, $lockMode) : string

Honors that some SQL vendors such as MsSql use table hints for locking instead of the ANSI SQL FOR UPDATE specification.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getForUpdateSQL () : string

Returns the FOR UPDATE expression.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::quoteSingleIdentifier ($str) : string

Quotes a single identifier (no dot chain separation).

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getTruncateTableSQL ($tableName, $cascade = false) : string

Generates a Truncate Table SQL statement for a given table.

Cascade is not supported on many platforms but would optionally cascade the truncate by
following the foreign keys.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getBlobTypeDeclarationSQL ($field) : string

Returns the SQL Snippet used to declare a BLOB column type.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getColumnDeclarationSQL ($name, $field) : string

Obtains DBMS specific SQL code portion needed to declare a generic type
field to be used in statements like CREATE TABLE.

Modifies column declaration order as it differs in Microsoft SQL Server.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getCommentOnTableSQL ($tableName, $comment) : string

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getListTableMetadataSQL ($table) : string

method Doctrine\DBAL\Platforms\SQLServer2008Platform::__construct () : void

method Doctrine\DBAL\Platforms\SQLServer2008Platform::setEventManager ($eventManager) : void

Sets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getEventManager () : Doctrine\Common\EventManager

Gets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getVarcharTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a VARCHAR column type.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getBinaryTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getJsonTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a JSON field.

By default this maps directly to a CLOB and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::registerDoctrineTypeMapping ($dbType, $doctrineType) : void

Registers a doctrine type to be used in conjunction with a column type of this platform.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDoctrineTypeMapping ($dbType) : string

Gets the Doctrine type that is mapped for the given database column type.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::hasDoctrineTypeMappingFor ($dbType) : bool

Checks if a database type is currently supported by this platform.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::initializeCommentedDoctrineTypes () : void

Initializes the Doctrine Type comments instance variable for in_array() checks.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::isCommentedDoctrineType ($doctrineType) : bool

Is it necessary for the platform to add a parsable type comment to allow reverse engineering the given type?

method Doctrine\DBAL\Platforms\SQLServer2008Platform::markDoctrineTypeCommented ($doctrineType) : void

Marks this type as to be commented in ALTER TABLE and CREATE TABLE statements.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDoctrineTypeComment ($doctrineType) : string

Gets the comment to append to a column comment that helps parsing this type in reverse engineering.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getColumnComment ($column) : stringnull

Gets the comment of a passed column modified by potential doctrine type comment hints.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getIdentifierQuoteCharacter () : string

Gets the character used for identifier quoting.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getSqlCommentStartString () : string

Gets the string portion that starts an SQL comment.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getSqlCommentEndString () : string

Gets the string portion that ends an SQL comment.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getCharMaxLength () : int

Gets the maximum length of a char field.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getVarcharMaxLength () : int

Gets the maximum length of a varchar field.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getVarcharDefaultLength () : int

Gets the default length of a varchar field.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getBinaryDefaultLength () : int

Gets the default length of a binary field.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getWildcards () : string[]

Gets all SQL wildcard characters of the platform.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getRegexpExpression () : string

Returns the regular expression operator.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getAvgExpression ($column) : string

Returns the SQL snippet to get the average value of a column.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getCountExpression ($column) : string

Returns the SQL snippet to get the number of rows (without a NULL value) of a column.

If a '*' is used instead of a column the number of selected rows is returned.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getMaxExpression ($column) : string

Returns the SQL snippet to get the highest value of a column.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getMinExpression ($column) : string

Returns the SQL snippet to get the lowest value of a column.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getSumExpression ($column) : string

Returns the SQL snippet to get the total sum of a column.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getMd5Expression ($column) : string

Returns the SQL snippet to get the md5 sum of a field.

Note: Not SQL92, but common functionality.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getSqrtExpression ($column) : string

Returns the SQL snippet to get the squared value of a column.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getRoundExpression ($column, $decimals = 0) : string

Returns the SQL snippet to round a numeric field to the number of decimals specified.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getRtrimExpression ($str) : string

Returns the SQL snippet to trim trailing space characters from the expression.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getLtrimExpression ($str) : string

Returns the SQL snippet to trim leading space characters from the expression.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getUpperExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to uppercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getLowerExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to lowercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getNowExpression () : string

Returns the SQL snippet to get the current system date.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getNotExpression ($expression) : string

Returns the SQL for a logical not.

Example:

$q = new Doctrine_Query();
$e = $q->expr;
$q->select('*')->from('table')
->where($e->eq('id', $e->not('null'));

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getIsNullExpression ($expression) : string

Returns the SQL that checks if an expression is null.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getIsNotNullExpression ($expression) : string

Returns the SQL that checks if an expression is not null.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getBetweenExpression ($expression, $value1, $value2) : string

Returns the SQL that checks if an expression evaluates to a value between two values.

The parameter $expression is checked if it is between $value1 and $value2.

Note: There is a slight difference in the way BETWEEN works on some databases.
http://www.w3schools.com/sql/sql_between.asp. If you want complete database
independence you should avoid using between().

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getAcosExpression ($value) : string

Returns the SQL to get the arccosine of a value.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getSinExpression ($value) : string

Returns the SQL to get the sine of a value.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getPiExpression () : string

Returns the SQL to get the PI value.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getCosExpression ($value) : string

Returns the SQL to get the cosine of a value.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDateAddSecondsExpression ($date, $seconds) : string

Returns the SQL to add the number of given seconds to a date.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDateSubSecondsExpression ($date, $seconds) : string

Returns the SQL to subtract the number of given seconds from a date.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDateAddMinutesExpression ($date, $minutes) : string

Returns the SQL to add the number of given minutes to a date.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDateSubMinutesExpression ($date, $minutes) : string

Returns the SQL to subtract the number of given minutes from a date.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDateAddHourExpression ($date, $hours) : string

Returns the SQL to add the number of given hours to a date.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDateSubHourExpression ($date, $hours) : string

Returns the SQL to subtract the number of given hours to a date.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDateAddDaysExpression ($date, $days) : string

Returns the SQL to add the number of given days to a date.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDateSubDaysExpression ($date, $days) : string

Returns the SQL to subtract the number of given days to a date.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDateAddWeeksExpression ($date, $weeks) : string

Returns the SQL to add the number of given weeks to a date.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDateSubWeeksExpression ($date, $weeks) : string

Returns the SQL to subtract the number of given weeks from a date.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDateAddMonthExpression ($date, $months) : string

Returns the SQL to add the number of given months to a date.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDateSubMonthExpression ($date, $months) : string

Returns the SQL to subtract the number of given months to a date.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDateAddQuartersExpression ($date, $quarters) : string

Returns the SQL to add the number of given quarters to a date.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDateSubQuartersExpression ($date, $quarters) : string

Returns the SQL to subtract the number of given quarters from a date.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDateAddYearsExpression ($date, $years) : string

Returns the SQL to add the number of given years to a date.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDateSubYearsExpression ($date, $years) : string

Returns the SQL to subtract the number of given years from a date.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getBitAndComparisonExpression ($value1, $value2) : string

Returns the SQL bit AND comparison expression.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getBitOrComparisonExpression ($value1, $value2) : string

Returns the SQL bit OR comparison expression.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getReadLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which locks rows in shared read lock.

This defaults to the ANSI SQL "FOR UPDATE", which is an exclusive lock (Write). Some database
vendors allow to lighten this constraint up to be a real read lock.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getWriteLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which obtains an exclusive lock on the rows.

The semantics of this lock mode should equal the SELECT .. FOR UPDATE of the ANSI SQL standard.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDropTableSQL ($table) : string

Returns the SQL snippet to drop an existing table.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDropTemporaryTableSQL ($table) : string

Returns the SQL to safely drop a temporary table WITHOUT implicitly committing an open transaction.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDropConstraintSQL ($constraint, $table) : string

Returns the SQL to drop a constraint.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getCreateTableSQL ($table, $createFlags = self::CREATE_INDEXES) : string[]

Returns the SQL statement(s) to create a table with the specified name, columns and constraints
on this platform.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getCommentOnColumnSQL ($tableName, $columnName, $comment) : string

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getInlineColumnCommentSQL ($comment) : string

Returns the SQL to create inline comment on a column.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getCreateSequenceSQL ($sequence) : string

Returns the SQL to create a sequence on this platform.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getAlterSequenceSQL ($sequence) : string

Returns the SQL to change a sequence on this platform.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getCreateConstraintSQL ($constraint, $table) : string

Returns the SQL to create a constraint on a table on this platform.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getPartialIndexSQL ($index) : string

Adds condition for partial index.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::quoteIdentifier ($str) : string

Quotes a string so that it can be safely used as a table or column name,
even if it is a reserved word of the platform. This also detects identifier
chains separated by dot and quotes them independently.

NOTE: Just because you CAN use quoted identifiers doesn't mean
you SHOULD use them. In general, they end up causing way more
problems than they solve.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getCreateForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to create a new foreign key.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::onSchemaAlterTableAddColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SQLServer2008Platform::onSchemaAlterTableRemoveColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SQLServer2008Platform::onSchemaAlterTableChangeColumn ($columnDiff, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SQLServer2008Platform::onSchemaAlterTableRenameColumn ($oldColumnName, $column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SQLServer2008Platform::onSchemaAlterTable ($diff, &$sql) : bool

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getPreAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getPostAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\SQLServer2008Platform::_getAlterTableIndexForeignKeySQL ($diff) : string[]

Common code for alter table statement generation that updates the changed Index and Foreign Key definitions.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getColumnDeclarationListSQL ($fields) : string

Gets declaration of a number of fields in bulk.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDecimalTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a floating point column of arbitrary precision.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDefaultValueDeclarationSQL ($field) : string

Obtains DBMS specific SQL code portion needed to set a default value
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getCheckDeclarationSQL ($definition) : string

Obtains DBMS specific SQL code portion needed to set a CHECK constraint
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getIndexDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getCustomTypeDeclarationSQL ($columnDef) : string

Obtains SQL code portion needed to create a custom column,
e.g. when a field has the "columnDefinition" keyword.
Only "AUTOINCREMENT" and "PRIMARY KEY" are added if appropriate.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getIndexFieldDeclarationListSQL ($columnsOrIndex) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getTemporaryTableSQL () : string

Returns the required SQL string that fits between CREATE ... TABLE
to create the table as a temporary table.

Should be overridden in driver classes to return the correct string for the
specific database type.

The default is to return the string "TEMPORARY" - this will result in a
SQL error for any database that does not support temporary tables, or that
requires a different SQL command from "CREATE TEMPORARY TABLE".

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getForeignKeyDeclarationSQL ($foreignKey) : string

Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getAdvancedForeignKeyOptionsSQL ($foreignKey) : string

Returns the FOREIGN KEY query section dealing with non-standard options
as MATCH, INITIALLY DEFERRED, ON UPDATE, ...

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getForeignKeyBaseDeclarationSQL ($foreignKey) : string

Obtains DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getUniqueFieldDeclarationSQL () : string

Obtains DBMS specific SQL code portion needed to set the UNIQUE constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getColumnCharsetDeclarationSQL ($charset) : string

Obtains DBMS specific SQL code portion needed to set the CHARACTER SET
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getColumnCollationDeclarationSQL ($collation) : string

Obtains DBMS specific SQL code portion needed to set the COLLATION
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::prefersSequences () : bool

Whether the platform prefers sequences for ID generation.
Subclasses should override this method to return TRUE if they prefer sequences.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::convertFromBoolean ($item) : boolnull

Some platforms have boolean literals that needs to be correctly converted

The default conversion tries to convert value into bool "(bool)$item"

method Doctrine\DBAL\Platforms\SQLServer2008Platform::convertBooleansToDatabaseValue ($item) : mixed

This method should handle the prepared statements case. When there is no
distinction, it's OK to use the same method.

Note: if the input is not a boolean the original input might be returned.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getCurrentTimestampSQL () : string

Returns the SQL specific for the platform to get the current timestamp

method Doctrine\DBAL\Platforms\SQLServer2008Platform::_getTransactionIsolationLevelSQL ($level) : string

Returns the SQL for a given transaction isolation level Connection constant.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getListSequencesSQL ($database) : string

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getListTableConstraintsSQL ($table) : string

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getListUsersSQL () : string

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDropSequenceSQL ($sequence) : string

Returns the SQL snippet to drop an existing sequence.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getSequenceNextValSQL ($sequenceName) : string

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getFloatDeclarationSQL ($fieldDeclaration) : string

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDefaultTransactionIsolationLevel () : int

Gets the default transaction isolation level of the platform.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::supportsSequences () : bool

Whether the platform supports sequences.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::usesSequenceEmulatedIdentityColumns () : bool

Whether the platform emulates identity columns through sequences.

Some platforms that do not support identity columns natively
but support sequences can emulate identity columns by using
sequences.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getIdentitySequenceName ($tableName, $columnName) : string

Returns the name of the sequence for a particular identity column in a particular table.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::supportsIndexes () : bool

Whether the platform supports indexes.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::supportsPartialIndexes () : bool

Whether the platform supports partial indexes.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::supportsColumnLengthIndexes () : bool

Whether the platform supports indexes with column length definitions.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::supportsAlterTable () : bool

Whether the platform supports altering tables.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::supportsTransactions () : bool

Whether the platform supports transactions.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::supportsSavepoints () : bool

Whether the platform supports savepoints.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::supportsPrimaryConstraints () : bool

Whether the platform supports primary key constraints.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::supportsForeignKeyConstraints () : bool

Whether the platform supports foreign key constraints.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::supportsForeignKeyOnUpdate () : bool

Whether this platform supports onUpdate in foreign key constraints.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::canEmulateSchemas () : bool

Whether this platform can emulate schemas.

Platforms that either support or emulate schemas don't automatically
filter a schema for the namespaced elements in {@link
AbstractManager#createSchema}.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::supportsGettingAffectedRows () : bool

Whether the platform supports getting the affected rows of a recent update/delete type query.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::supportsInlineColumnComments () : bool

Whether this platform support to add inline column comments as postfix.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::supportsCommentOnStatement () : bool

Whether this platform support the proprietary syntax "COMMENT ON asset".

method Doctrine\DBAL\Platforms\SQLServer2008Platform::hasNativeJsonType () : bool

Does this platform have native JSON type.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getIdentityColumnNullInsertSQL () : void

method Doctrine\DBAL\Platforms\SQLServer2008Platform::supportsViews () : bool

Whether this platform supports views.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::modifyLimitQuery ($query, $limit, $offset = null) : string

Adds an driver-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getSQLResultCasing ($column) : string

Gets the character casing of a column in an SQL result set of this platform.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::fixSchemaElementName ($schemaElementName) : string

Makes any fixes to a name of a schema element (table, sequence, ...) that are required
by restrictions of the platform, like a maximum length.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getMaxIdentifierLength () : int

Maximum length of any given database identifier, like tables or column names.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getDummySelectSQL () : string

This is for test reasons, many vendors have special requirements for dummy statements.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getReservedKeywordsList () : Doctrine\DBAL\Platforms\Keywords\KeywordList

Returns the keyword list instance of this platform.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::quoteStringLiteral ($str) : string

Quotes a literal string.
This method is NOT meant to fix SQL injections!
It is only meant to escape this platform's string literal
quote character inside the given literal string.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::getStringLiteralQuoteCharacter () : string

Gets the character used for string literal quoting.

method Doctrine\DBAL\Platforms\SQLServer2008Platform::escapeStringForLike ($inputString, $escapeChar) : string

Escapes metacharacters in a string intended to be used with a LIKE
operator.

class Doctrine\DBAL\Platforms::SQLServer2012Platform

Platform to ensure compatibility of Doctrine with Microsoft SQL Server 2012 version.

Differences to SQL Server 2008 and before are that sequences are introduced,
and support for the new OFFSET... FETCH syntax for result pagination has been added.

classconstant integer Doctrine\DBAL\Platforms\SQLServer2012Platform::CREATE_INDEXES

classconstant integer Doctrine\DBAL\Platforms\SQLServer2012Platform::CREATE_FOREIGNKEYS

classconstant string Doctrine\DBAL\Platforms\SQLServer2012Platform::DATE_INTERVAL_UNIT_SECOND

classconstant string Doctrine\DBAL\Platforms\SQLServer2012Platform::DATE_INTERVAL_UNIT_MINUTE

classconstant string Doctrine\DBAL\Platforms\SQLServer2012Platform::DATE_INTERVAL_UNIT_HOUR

classconstant string Doctrine\DBAL\Platforms\SQLServer2012Platform::DATE_INTERVAL_UNIT_DAY

classconstant string Doctrine\DBAL\Platforms\SQLServer2012Platform::DATE_INTERVAL_UNIT_WEEK

classconstant string Doctrine\DBAL\Platforms\SQLServer2012Platform::DATE_INTERVAL_UNIT_MONTH

classconstant string Doctrine\DBAL\Platforms\SQLServer2012Platform::DATE_INTERVAL_UNIT_QUARTER

classconstant string Doctrine\DBAL\Platforms\SQLServer2012Platform::DATE_INTERVAL_UNIT_YEAR

classconstant integer Doctrine\DBAL\Platforms\SQLServer2012Platform::TRIM_UNSPECIFIED

classconstant integer Doctrine\DBAL\Platforms\SQLServer2012Platform::TRIM_LEADING

classconstant integer Doctrine\DBAL\Platforms\SQLServer2012Platform::TRIM_TRAILING

classconstant integer Doctrine\DBAL\Platforms\SQLServer2012Platform::TRIM_BOTH

property string[]null Doctrine\DBAL\Platforms\SQLServer2012Platform::doctrineTypeMapping

property string[]null Doctrine\DBAL\Platforms\SQLServer2012Platform::doctrineTypeComments

Contains a list of all columns that should generate parseable column comments for type-detection
in reverse engineering scenarios.

property Doctrine\Common\EventManager Doctrine\DBAL\Platforms\SQLServer2012Platform::_eventManager

property Doctrine\DBAL\Platforms\Keywords\KeywordListnull Doctrine\DBAL\Platforms\SQLServer2012Platform::_keywords

Holds the KeywordList instance for the current platform.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getAlterSequenceSQL ($sequence) : string

Returns the SQL to change a sequence on this platform.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getCreateSequenceSQL ($sequence) : string

Returns the SQL to create a sequence on this platform.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDropSequenceSQL ($sequence) : string

Returns the SQL snippet to drop an existing sequence.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getListSequencesSQL ($database) : string

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getSequenceNextValSQL ($sequenceName) : string

method Doctrine\DBAL\Platforms\SQLServer2012Platform::supportsSequences () : bool

Whether the platform supports sequences.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getReservedKeywordsClass () : string

Returns the class name of the reserved keywords list.

Returns Microsoft SQL Server 2012 specific keywords class

method Doctrine\DBAL\Platforms\SQLServer2012Platform::doModifyLimitQuery ($query, $limit, $offset) : string

Adds an platform-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getListTablesSQL () : string

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDateTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime fields in
statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDateTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create date fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create time fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDateTimeTzTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime with timezone offset fields.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDateTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime value of this platform.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDateTimeTzFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime with timezone value of this platform.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDateFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored date value of this platform.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored time value of this platform.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::initializeDoctrineTypeMappings () : void

Lazy load Doctrine Type Mappings.

Adding Datetime2 Type

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getLikeWildcardCharacters () : string

method Doctrine\DBAL\Platforms\SQLServer2012Platform::supportsLimitOffset () : bool

Whether the database platform support offsets in modify limit clauses.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getClobTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a CLOB column type.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getCurrentDateSQL () : string

Returns the SQL specific for the platform to get the current date.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getCurrentTimeSQL () : string

Returns the SQL specific for the platform to get the current time.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDateArithmeticIntervalExpression ($date, $operator, $interval, $unit) : string

Returns the SQL for a date arithmetic expression.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDateDiffExpression ($date1, $date2) : string

Returns the SQL to calculate the difference in days between the two passed dates.

Computes diff = date1 - date2.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::prefersIdentityColumns () : bool

Whether the platform prefers identity columns (eg. autoincrement) for ID generation.
Subclasses should override this method to return TRUE if they prefer identity columns.

Microsoft SQL Server prefers "autoincrement" identity columns
since sequences can only be emulated with a table.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::supportsIdentityColumns () : bool

Whether the platform supports identity columns.

Identity columns are columns that receive an auto-generated value from the
database on insert of a row.

Microsoft SQL Server supports this through AUTO_INCREMENT columns.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::supportsReleaseSavepoints () : bool

Whether the platform supports releasing savepoints.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::supportsSchemas () : bool

Whether the platform supports database schemas.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDefaultSchemaName () : string

Returns the default schema name.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::supportsColumnCollation () : bool

Does this platform support column collation?

method Doctrine\DBAL\Platforms\SQLServer2012Platform::hasNativeGuidType () : bool

Does this platform have native guid type.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getCreateDatabaseSQL ($name) : string

Returns the SQL to create a new database.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDropDatabaseSQL ($name) : string

Returns the SQL snippet to drop an existing database.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::supportsCreateDropDatabase () : bool

Whether this platform supports create database.

Some databases don't allow to create and drop databases at all or only with certain tools.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getCreateSchemaSQL ($schemaName) : string

Returns the SQL to create a named schema.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDropForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to drop a foreign key.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDropIndexSQL ($index, $table = null) : string

Returns the SQL to drop an index from a table.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::_getCreateTableSQL ($tableName, $columns, $options = []) : string[]

Returns the SQL used to create a table.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getCreatePrimaryKeySQL ($index, $table) : string

Returns the SQL to create an unnamed primary key constraint.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getCreateColumnCommentSQL ($tableName, $columnName, $comment) : string

Returns the SQL statement for creating a column comment.

SQL Server does not support native column comments,
therefore the extended properties functionality is used
as a workaround to store them.
The property name used to store column comments is "MS_Description"
which provides compatibility with SQL Server Management Studio,
as column comments are stored in the same property there when
specifying a column's "Description" attribute.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDefaultConstraintDeclarationSQL ($table, $column) : string

Returns the SQL snippet for declaring a default constraint.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getUniqueConstraintDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set a unique
constraint declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getCreateIndexSQL ($index, $table) : string

Returns the SQL to create an index on a table on this platform.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getCreateIndexSQLFlags ($index) : string

Adds additional flags for index generation.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getAlterTableSQL ($diff) : string[]

Gets the SQL statements for altering an existing table.

This method returns an array of SQL statements, since some platforms need several statements.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getAlterColumnCommentSQL ($tableName, $columnName, $comment) : string

Returns the SQL statement for altering a column comment.

SQL Server does not support native column comments,
therefore the extended properties functionality is used
as a workaround to store them.
The property name used to store column comments is "MS_Description"
which provides compatibility with SQL Server Management Studio,
as column comments are stored in the same property there when
specifying a column's "Description" attribute.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDropColumnCommentSQL ($tableName, $columnName) : string

Returns the SQL statement for dropping a column comment.

SQL Server does not support native column comments,
therefore the extended properties functionality is used
as a workaround to store them.
The property name used to store column comments is "MS_Description"
which provides compatibility with SQL Server Management Studio,
as column comments are stored in the same property there when
specifying a column's "Description" attribute.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getRenameIndexSQL ($oldIndexName, $index, $tableName) : string[]

Returns the SQL for renaming an index on a table.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getAddExtendedPropertySQL ($name, $value = null, $level0Type = null, $level0Name = null, $level1Type = null, $level1Name = null, $level2Type = null, $level2Name = null) : string

Returns the SQL statement for adding an extended property to a database object.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDropExtendedPropertySQL ($name, $level0Type = null, $level0Name = null, $level1Type = null, $level1Name = null, $level2Type = null, $level2Name = null) : string

Returns the SQL statement for dropping an extended property from a database object.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getUpdateExtendedPropertySQL ($name, $value = null, $level0Type = null, $level0Name = null, $level1Type = null, $level1Name = null, $level2Type = null, $level2Name = null) : string

Returns the SQL statement for updating an extended property of a database object.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getEmptyIdentityInsertSQL ($quotedTableName, $quotedIdentifierColumnName) : string

Returns the insert SQL for an empty insert statement.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getListTableColumnsSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getListTableForeignKeysSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getListTableIndexesSQL ($table, $currentDatabase = null) : string

Returns the list of indexes for the current database.

The current database parameter is optional but will always be passed
when using the SchemaManager API and is the database the given table is in.

Attention: Some platforms only support currentDatabase when they
are connected with that database. Cross-database information schema
requests may be impossible.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getCreateViewSQL ($name, $sql) : string

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getListViewsSQL ($database) : string

Returns the SQL to list all views of a database or user.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDropViewSQL ($name) : string

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getGuidExpression () : string

Returns the global unique identifier expression.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getLocateExpression ($str, $substr, $startPos = false) : string

Returns the SQL snippet to get the position of the first occurrence of substring $substr in string $str.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getModExpression ($expression1, $expression2) : string

Returns the SQL snippet to get the remainder of the division operation $expression1 / $expression2.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getTrimExpression ($str, $pos = Doctrine\DBAL\Platforms\TrimMode::UNSPECIFIED, $char = false) : string

Returns the SQL snippet to trim a string.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getConcatExpression () : string

Returns a SQL snippet to concatenate the given expressions.

Accepts an arbitrary number of string parameters. Each parameter must contain an expression.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getListDatabasesSQL () : string

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getListNamespacesSQL () : string

Returns the SQL statement for retrieving the namespaces defined in the database.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getSubstringExpression ($value, $from, $length = null) : string

Returns a SQL snippet to get a substring inside an SQL statement.

Note: Not SQL92, but common functionality.

SQLite only supports the 2 parameter variant of this function.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getLengthExpression ($column) : string

Returns the SQL snippet to get the length of a text field.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getSetTransactionIsolationSQL ($level) : string

Returns the SQL to set the transaction isolation level.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getIntegerTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a 4 byte integer column.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getBigIntTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares an 8 byte integer column.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getSmallIntTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a 2 byte integer column.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getGuidTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a GUID/UUID field.

By default this maps directly to a CHAR(36) and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getVarcharTypeDeclarationSQLSnippet ($length, $fixed) : string

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getBinaryTypeDeclarationSQLSnippet ($length, $fixed) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getBinaryMaxLength () : int

Gets the maximum length of a binary field.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::_getCommonIntegerTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares common properties of an integer column.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getBooleanTypeDeclarationSQL ($field) : string

Returns the SQL snippet that declares a boolean column.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::convertBooleans ($item) : mixed

Some platforms need the boolean values to be converted.

The default conversion in this implementation converts to integers (false => 0, true => 1).

Note: if the input is not a boolean the original input might be returned.

There are two contexts when converting booleans: Literals and Prepared Statements.
This method should handle the literal case

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getCreateTemporaryTableSnippetSQL () : string

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getTemporaryTableName ($tableName) : string

Some vendors require temporary table names to be qualified specially.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getName () : string

Gets the name of the platform.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::createSavePoint ($savepoint) : string

Returns the SQL to create a new savepoint.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::releaseSavePoint ($savepoint) : string

Returns the SQL to release a savepoint.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::rollbackSavePoint ($savepoint) : string

Returns the SQL to rollback a savepoint.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getForeignKeyReferentialActionSQL ($action) : string

Returns the given referential action in uppercase if valid, otherwise throws an exception.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::appendLockHint ($fromClause, $lockMode) : string

Honors that some SQL vendors such as MsSql use table hints for locking instead of the ANSI SQL FOR UPDATE specification.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getForUpdateSQL () : string

Returns the FOR UPDATE expression.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::quoteSingleIdentifier ($str) : string

Quotes a single identifier (no dot chain separation).

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getTruncateTableSQL ($tableName, $cascade = false) : string

Generates a Truncate Table SQL statement for a given table.

Cascade is not supported on many platforms but would optionally cascade the truncate by
following the foreign keys.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getBlobTypeDeclarationSQL ($field) : string

Returns the SQL Snippet used to declare a BLOB column type.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getColumnDeclarationSQL ($name, $field) : string

Obtains DBMS specific SQL code portion needed to declare a generic type
field to be used in statements like CREATE TABLE.

Modifies column declaration order as it differs in Microsoft SQL Server.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getCommentOnTableSQL ($tableName, $comment) : string

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getListTableMetadataSQL ($table) : string

method Doctrine\DBAL\Platforms\SQLServer2012Platform::__construct () : void

method Doctrine\DBAL\Platforms\SQLServer2012Platform::setEventManager ($eventManager) : void

Sets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getEventManager () : Doctrine\Common\EventManager

Gets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getVarcharTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a VARCHAR column type.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getBinaryTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getJsonTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a JSON field.

By default this maps directly to a CLOB and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::registerDoctrineTypeMapping ($dbType, $doctrineType) : void

Registers a doctrine type to be used in conjunction with a column type of this platform.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDoctrineTypeMapping ($dbType) : string

Gets the Doctrine type that is mapped for the given database column type.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::hasDoctrineTypeMappingFor ($dbType) : bool

Checks if a database type is currently supported by this platform.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::initializeCommentedDoctrineTypes () : void

Initializes the Doctrine Type comments instance variable for in_array() checks.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::isCommentedDoctrineType ($doctrineType) : bool

Is it necessary for the platform to add a parsable type comment to allow reverse engineering the given type?

method Doctrine\DBAL\Platforms\SQLServer2012Platform::markDoctrineTypeCommented ($doctrineType) : void

Marks this type as to be commented in ALTER TABLE and CREATE TABLE statements.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDoctrineTypeComment ($doctrineType) : string

Gets the comment to append to a column comment that helps parsing this type in reverse engineering.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getColumnComment ($column) : stringnull

Gets the comment of a passed column modified by potential doctrine type comment hints.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getIdentifierQuoteCharacter () : string

Gets the character used for identifier quoting.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getSqlCommentStartString () : string

Gets the string portion that starts an SQL comment.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getSqlCommentEndString () : string

Gets the string portion that ends an SQL comment.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getCharMaxLength () : int

Gets the maximum length of a char field.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getVarcharMaxLength () : int

Gets the maximum length of a varchar field.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getVarcharDefaultLength () : int

Gets the default length of a varchar field.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getBinaryDefaultLength () : int

Gets the default length of a binary field.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getWildcards () : string[]

Gets all SQL wildcard characters of the platform.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getRegexpExpression () : string

Returns the regular expression operator.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getAvgExpression ($column) : string

Returns the SQL snippet to get the average value of a column.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getCountExpression ($column) : string

Returns the SQL snippet to get the number of rows (without a NULL value) of a column.

If a '*' is used instead of a column the number of selected rows is returned.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getMaxExpression ($column) : string

Returns the SQL snippet to get the highest value of a column.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getMinExpression ($column) : string

Returns the SQL snippet to get the lowest value of a column.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getSumExpression ($column) : string

Returns the SQL snippet to get the total sum of a column.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getMd5Expression ($column) : string

Returns the SQL snippet to get the md5 sum of a field.

Note: Not SQL92, but common functionality.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getSqrtExpression ($column) : string

Returns the SQL snippet to get the squared value of a column.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getRoundExpression ($column, $decimals = 0) : string

Returns the SQL snippet to round a numeric field to the number of decimals specified.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getRtrimExpression ($str) : string

Returns the SQL snippet to trim trailing space characters from the expression.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getLtrimExpression ($str) : string

Returns the SQL snippet to trim leading space characters from the expression.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getUpperExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to uppercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getLowerExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to lowercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getNowExpression () : string

Returns the SQL snippet to get the current system date.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getNotExpression ($expression) : string

Returns the SQL for a logical not.

Example:

$q = new Doctrine_Query();
$e = $q->expr;
$q->select('*')->from('table')
->where($e->eq('id', $e->not('null'));

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getIsNullExpression ($expression) : string

Returns the SQL that checks if an expression is null.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getIsNotNullExpression ($expression) : string

Returns the SQL that checks if an expression is not null.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getBetweenExpression ($expression, $value1, $value2) : string

Returns the SQL that checks if an expression evaluates to a value between two values.

The parameter $expression is checked if it is between $value1 and $value2.

Note: There is a slight difference in the way BETWEEN works on some databases.
http://www.w3schools.com/sql/sql_between.asp. If you want complete database
independence you should avoid using between().

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getAcosExpression ($value) : string

Returns the SQL to get the arccosine of a value.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getSinExpression ($value) : string

Returns the SQL to get the sine of a value.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getPiExpression () : string

Returns the SQL to get the PI value.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getCosExpression ($value) : string

Returns the SQL to get the cosine of a value.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDateAddSecondsExpression ($date, $seconds) : string

Returns the SQL to add the number of given seconds to a date.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDateSubSecondsExpression ($date, $seconds) : string

Returns the SQL to subtract the number of given seconds from a date.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDateAddMinutesExpression ($date, $minutes) : string

Returns the SQL to add the number of given minutes to a date.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDateSubMinutesExpression ($date, $minutes) : string

Returns the SQL to subtract the number of given minutes from a date.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDateAddHourExpression ($date, $hours) : string

Returns the SQL to add the number of given hours to a date.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDateSubHourExpression ($date, $hours) : string

Returns the SQL to subtract the number of given hours to a date.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDateAddDaysExpression ($date, $days) : string

Returns the SQL to add the number of given days to a date.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDateSubDaysExpression ($date, $days) : string

Returns the SQL to subtract the number of given days to a date.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDateAddWeeksExpression ($date, $weeks) : string

Returns the SQL to add the number of given weeks to a date.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDateSubWeeksExpression ($date, $weeks) : string

Returns the SQL to subtract the number of given weeks from a date.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDateAddMonthExpression ($date, $months) : string

Returns the SQL to add the number of given months to a date.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDateSubMonthExpression ($date, $months) : string

Returns the SQL to subtract the number of given months to a date.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDateAddQuartersExpression ($date, $quarters) : string

Returns the SQL to add the number of given quarters to a date.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDateSubQuartersExpression ($date, $quarters) : string

Returns the SQL to subtract the number of given quarters from a date.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDateAddYearsExpression ($date, $years) : string

Returns the SQL to add the number of given years to a date.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDateSubYearsExpression ($date, $years) : string

Returns the SQL to subtract the number of given years from a date.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getBitAndComparisonExpression ($value1, $value2) : string

Returns the SQL bit AND comparison expression.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getBitOrComparisonExpression ($value1, $value2) : string

Returns the SQL bit OR comparison expression.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getReadLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which locks rows in shared read lock.

This defaults to the ANSI SQL "FOR UPDATE", which is an exclusive lock (Write). Some database
vendors allow to lighten this constraint up to be a real read lock.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getWriteLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which obtains an exclusive lock on the rows.

The semantics of this lock mode should equal the SELECT .. FOR UPDATE of the ANSI SQL standard.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDropTableSQL ($table) : string

Returns the SQL snippet to drop an existing table.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDropTemporaryTableSQL ($table) : string

Returns the SQL to safely drop a temporary table WITHOUT implicitly committing an open transaction.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDropConstraintSQL ($constraint, $table) : string

Returns the SQL to drop a constraint.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getCreateTableSQL ($table, $createFlags = self::CREATE_INDEXES) : string[]

Returns the SQL statement(s) to create a table with the specified name, columns and constraints
on this platform.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getCommentOnColumnSQL ($tableName, $columnName, $comment) : string

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getInlineColumnCommentSQL ($comment) : string

Returns the SQL to create inline comment on a column.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getCreateConstraintSQL ($constraint, $table) : string

Returns the SQL to create a constraint on a table on this platform.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getPartialIndexSQL ($index) : string

Adds condition for partial index.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::quoteIdentifier ($str) : string

Quotes a string so that it can be safely used as a table or column name,
even if it is a reserved word of the platform. This also detects identifier
chains separated by dot and quotes them independently.

NOTE: Just because you CAN use quoted identifiers doesn't mean
you SHOULD use them. In general, they end up causing way more
problems than they solve.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getCreateForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to create a new foreign key.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::onSchemaAlterTableAddColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SQLServer2012Platform::onSchemaAlterTableRemoveColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SQLServer2012Platform::onSchemaAlterTableChangeColumn ($columnDiff, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SQLServer2012Platform::onSchemaAlterTableRenameColumn ($oldColumnName, $column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SQLServer2012Platform::onSchemaAlterTable ($diff, &$sql) : bool

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getPreAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getPostAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\SQLServer2012Platform::_getAlterTableIndexForeignKeySQL ($diff) : string[]

Common code for alter table statement generation that updates the changed Index and Foreign Key definitions.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getColumnDeclarationListSQL ($fields) : string

Gets declaration of a number of fields in bulk.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDecimalTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a floating point column of arbitrary precision.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDefaultValueDeclarationSQL ($field) : string

Obtains DBMS specific SQL code portion needed to set a default value
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getCheckDeclarationSQL ($definition) : string

Obtains DBMS specific SQL code portion needed to set a CHECK constraint
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getIndexDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getCustomTypeDeclarationSQL ($columnDef) : string

Obtains SQL code portion needed to create a custom column,
e.g. when a field has the "columnDefinition" keyword.
Only "AUTOINCREMENT" and "PRIMARY KEY" are added if appropriate.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getIndexFieldDeclarationListSQL ($columnsOrIndex) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getTemporaryTableSQL () : string

Returns the required SQL string that fits between CREATE ... TABLE
to create the table as a temporary table.

Should be overridden in driver classes to return the correct string for the
specific database type.

The default is to return the string "TEMPORARY" - this will result in a
SQL error for any database that does not support temporary tables, or that
requires a different SQL command from "CREATE TEMPORARY TABLE".

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getForeignKeyDeclarationSQL ($foreignKey) : string

Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getAdvancedForeignKeyOptionsSQL ($foreignKey) : string

Returns the FOREIGN KEY query section dealing with non-standard options
as MATCH, INITIALLY DEFERRED, ON UPDATE, ...

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getForeignKeyBaseDeclarationSQL ($foreignKey) : string

Obtains DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getUniqueFieldDeclarationSQL () : string

Obtains DBMS specific SQL code portion needed to set the UNIQUE constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getColumnCharsetDeclarationSQL ($charset) : string

Obtains DBMS specific SQL code portion needed to set the CHARACTER SET
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getColumnCollationDeclarationSQL ($collation) : string

Obtains DBMS specific SQL code portion needed to set the COLLATION
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::prefersSequences () : bool

Whether the platform prefers sequences for ID generation.
Subclasses should override this method to return TRUE if they prefer sequences.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::convertFromBoolean ($item) : boolnull

Some platforms have boolean literals that needs to be correctly converted

The default conversion tries to convert value into bool "(bool)$item"

method Doctrine\DBAL\Platforms\SQLServer2012Platform::convertBooleansToDatabaseValue ($item) : mixed

This method should handle the prepared statements case. When there is no
distinction, it's OK to use the same method.

Note: if the input is not a boolean the original input might be returned.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getCurrentTimestampSQL () : string

Returns the SQL specific for the platform to get the current timestamp

method Doctrine\DBAL\Platforms\SQLServer2012Platform::_getTransactionIsolationLevelSQL ($level) : string

Returns the SQL for a given transaction isolation level Connection constant.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getListTableConstraintsSQL ($table) : string

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getListUsersSQL () : string

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getFloatDeclarationSQL ($fieldDeclaration) : string

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDefaultTransactionIsolationLevel () : int

Gets the default transaction isolation level of the platform.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::usesSequenceEmulatedIdentityColumns () : bool

Whether the platform emulates identity columns through sequences.

Some platforms that do not support identity columns natively
but support sequences can emulate identity columns by using
sequences.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getIdentitySequenceName ($tableName, $columnName) : string

Returns the name of the sequence for a particular identity column in a particular table.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::supportsIndexes () : bool

Whether the platform supports indexes.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::supportsPartialIndexes () : bool

Whether the platform supports partial indexes.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::supportsColumnLengthIndexes () : bool

Whether the platform supports indexes with column length definitions.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::supportsAlterTable () : bool

Whether the platform supports altering tables.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::supportsTransactions () : bool

Whether the platform supports transactions.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::supportsSavepoints () : bool

Whether the platform supports savepoints.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::supportsPrimaryConstraints () : bool

Whether the platform supports primary key constraints.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::supportsForeignKeyConstraints () : bool

Whether the platform supports foreign key constraints.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::supportsForeignKeyOnUpdate () : bool

Whether this platform supports onUpdate in foreign key constraints.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::canEmulateSchemas () : bool

Whether this platform can emulate schemas.

Platforms that either support or emulate schemas don't automatically
filter a schema for the namespaced elements in {@link
AbstractManager#createSchema}.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::supportsGettingAffectedRows () : bool

Whether the platform supports getting the affected rows of a recent update/delete type query.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::supportsInlineColumnComments () : bool

Whether this platform support to add inline column comments as postfix.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::supportsCommentOnStatement () : bool

Whether this platform support the proprietary syntax "COMMENT ON asset".

method Doctrine\DBAL\Platforms\SQLServer2012Platform::hasNativeJsonType () : bool

Does this platform have native JSON type.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getIdentityColumnNullInsertSQL () : void

method Doctrine\DBAL\Platforms\SQLServer2012Platform::supportsViews () : bool

Whether this platform supports views.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::modifyLimitQuery ($query, $limit, $offset = null) : string

Adds an driver-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getSQLResultCasing ($column) : string

Gets the character casing of a column in an SQL result set of this platform.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::fixSchemaElementName ($schemaElementName) : string

Makes any fixes to a name of a schema element (table, sequence, ...) that are required
by restrictions of the platform, like a maximum length.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getMaxIdentifierLength () : int

Maximum length of any given database identifier, like tables or column names.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getDummySelectSQL () : string

This is for test reasons, many vendors have special requirements for dummy statements.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getReservedKeywordsList () : Doctrine\DBAL\Platforms\Keywords\KeywordList

Returns the keyword list instance of this platform.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::quoteStringLiteral ($str) : string

Quotes a literal string.
This method is NOT meant to fix SQL injections!
It is only meant to escape this platform's string literal
quote character inside the given literal string.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::getStringLiteralQuoteCharacter () : string

Gets the character used for string literal quoting.

method Doctrine\DBAL\Platforms\SQLServer2012Platform::escapeStringForLike ($inputString, $escapeChar) : string

Escapes metacharacters in a string intended to be used with a LIKE
operator.

class Doctrine\DBAL\Platforms::SQLAnywherePlatform

The SQLAnywherePlatform provides the behavior, features and SQL dialect of the
SAP Sybase SQL Anywhere 10 database platform.

classconstant integer Doctrine\DBAL\Platforms\SQLAnywherePlatform::FOREIGN_KEY_MATCH_SIMPLE

classconstant integer Doctrine\DBAL\Platforms\SQLAnywherePlatform::FOREIGN_KEY_MATCH_FULL

classconstant integer Doctrine\DBAL\Platforms\SQLAnywherePlatform::FOREIGN_KEY_MATCH_SIMPLE_UNIQUE

classconstant integer Doctrine\DBAL\Platforms\SQLAnywherePlatform::FOREIGN_KEY_MATCH_FULL_UNIQUE

classconstant integer Doctrine\DBAL\Platforms\SQLAnywherePlatform::CREATE_INDEXES

classconstant integer Doctrine\DBAL\Platforms\SQLAnywherePlatform::CREATE_FOREIGNKEYS

classconstant string Doctrine\DBAL\Platforms\SQLAnywherePlatform::DATE_INTERVAL_UNIT_SECOND

classconstant string Doctrine\DBAL\Platforms\SQLAnywherePlatform::DATE_INTERVAL_UNIT_MINUTE

classconstant string Doctrine\DBAL\Platforms\SQLAnywherePlatform::DATE_INTERVAL_UNIT_HOUR

classconstant string Doctrine\DBAL\Platforms\SQLAnywherePlatform::DATE_INTERVAL_UNIT_DAY

classconstant string Doctrine\DBAL\Platforms\SQLAnywherePlatform::DATE_INTERVAL_UNIT_WEEK

classconstant string Doctrine\DBAL\Platforms\SQLAnywherePlatform::DATE_INTERVAL_UNIT_MONTH

classconstant string Doctrine\DBAL\Platforms\SQLAnywherePlatform::DATE_INTERVAL_UNIT_QUARTER

classconstant string Doctrine\DBAL\Platforms\SQLAnywherePlatform::DATE_INTERVAL_UNIT_YEAR

classconstant integer Doctrine\DBAL\Platforms\SQLAnywherePlatform::TRIM_UNSPECIFIED

classconstant integer Doctrine\DBAL\Platforms\SQLAnywherePlatform::TRIM_LEADING

classconstant integer Doctrine\DBAL\Platforms\SQLAnywherePlatform::TRIM_TRAILING

classconstant integer Doctrine\DBAL\Platforms\SQLAnywherePlatform::TRIM_BOTH

property string[]null Doctrine\DBAL\Platforms\SQLAnywherePlatform::doctrineTypeMapping

property string[]null Doctrine\DBAL\Platforms\SQLAnywherePlatform::doctrineTypeComments

Contains a list of all columns that should generate parseable column comments for type-detection
in reverse engineering scenarios.

property Doctrine\Common\EventManager Doctrine\DBAL\Platforms\SQLAnywherePlatform::_eventManager

property Doctrine\DBAL\Platforms\Keywords\KeywordListnull Doctrine\DBAL\Platforms\SQLAnywherePlatform::_keywords

Holds the KeywordList instance for the current platform.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::appendLockHint ($fromClause, $lockMode) : string

Honors that some SQL vendors such as MsSql use table hints for locking instead of the ANSI SQL FOR UPDATE specification.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::fixSchemaElementName ($schemaElementName) : string

Makes any fixes to a name of a schema element (table, sequence, ...) that are required
by restrictions of the platform, like a maximum length.

SQL Anywhere supports a maximum length of 128 bytes for identifiers.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getAdvancedForeignKeyOptionsSQL ($foreignKey) : string

Returns the FOREIGN KEY query section dealing with non-standard options
as MATCH, INITIALLY DEFERRED, ON UPDATE, ...

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getAlterTableSQL ($diff) : string[]

Gets the SQL statements for altering an existing table.

This method returns an array of SQL statements, since some platforms need several statements.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getAlterTableAddColumnClause ($column) : string

Returns the SQL clause for creating a column in a table alteration.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getAlterTableClause ($tableName) : string

Returns the SQL clause for altering a table.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getAlterTableRemoveColumnClause ($column) : string

Returns the SQL clause for dropping a column in a table alteration.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getAlterTableRenameColumnClause ($oldColumnName, $column) : string

Returns the SQL clause for renaming a column in a table alteration.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getAlterTableRenameTableClause ($newTableName) : string

Returns the SQL clause for renaming a table in a table alteration.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getAlterTableChangeColumnClause ($columnDiff) : stringnull

Returns the SQL clause for altering a column in a table alteration.

This method returns null in case that only the column comment has changed.
Changes in column comments have to be handled differently.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getBigIntTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares an 8 byte integer column.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getBinaryDefaultLength () : int

Gets the default length of a binary field.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getBinaryMaxLength () : int

Gets the maximum length of a binary field.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getBlobTypeDeclarationSQL ($field) : string

Returns the SQL Snippet used to declare a BLOB column type.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getBooleanTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a boolean column.

BIT type columns require an explicit NULL declaration
in SQL Anywhere if they shall be nullable.
Otherwise by just omitting the NOT NULL clause,
SQL Anywhere will declare them NOT NULL nonetheless.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getClobTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a CLOB column type.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getCommentOnColumnSQL ($tableName, $columnName, $comment) : string

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getConcatExpression () : string

Returns a SQL snippet to concatenate the given expressions.

Accepts an arbitrary number of string parameters. Each parameter must contain an expression.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getCreateConstraintSQL ($constraint, $table) : string

Returns the SQL to create a constraint on a table on this platform.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getCreateDatabaseSQL ($database) : string

Returns the SQL to create a new database.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getCreateIndexSQL ($index, $table) : string

Returns the SQL to create an index on a table on this platform.

Appends SQL Anywhere specific flags if given.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getCreatePrimaryKeySQL ($index, $table) : string

Returns the SQL to create an unnamed primary key constraint.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getCreateTemporaryTableSnippetSQL () : string

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getCreateViewSQL ($name, $sql) : string

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getCurrentDateSQL () : string

Returns the SQL specific for the platform to get the current date.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getCurrentTimeSQL () : string

Returns the SQL specific for the platform to get the current time.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getCurrentTimestampSQL () : string

Returns the SQL specific for the platform to get the current timestamp

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDateArithmeticIntervalExpression ($date, $operator, $interval, $unit) : string

Returns the SQL for a date arithmetic expression.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDateDiffExpression ($date1, $date2) : string

Returns the SQL to calculate the difference in days between the two passed dates.

Computes diff = date1 - date2.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDateTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime value of this platform.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDateTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime fields in
statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDateTimeTzFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime with timezone value of this platform.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDateTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create date fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDefaultTransactionIsolationLevel () : int

Gets the default transaction isolation level of the platform.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDropDatabaseSQL ($database) : string

Returns the SQL snippet to drop an existing database.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDropIndexSQL ($index, $table = null) : string

Returns the SQL to drop an index from a table.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDropViewSQL ($name) : string

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getForeignKeyBaseDeclarationSQL ($foreignKey) : string

Obtains DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getForeignKeyMatchClauseSQL ($type) : string

Returns foreign key MATCH clause for given type.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getForeignKeyReferentialActionSQL ($action) : string

Returns the given referential action in uppercase if valid, otherwise throws an exception.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getForUpdateSQL () : string

Returns the FOR UPDATE expression.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getGuidExpression () : string

Returns the global unique identifier expression.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getGuidTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a GUID/UUID field.

By default this maps directly to a CHAR(36) and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getIndexDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getIntegerTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a 4 byte integer column.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getListDatabasesSQL () : string

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getListTableColumnsSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getListTableConstraintsSQL ($table) : string

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getListTableForeignKeysSQL ($table) : string

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getListTableIndexesSQL ($table, $currentDatabase = null) : string

Returns the list of indexes for the current database.

The current database parameter is optional but will always be passed
when using the SchemaManager API and is the database the given table is in.

Attention: Some platforms only support currentDatabase when they
are connected with that database. Cross-database information schema
requests may be impossible.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getListTablesSQL () : string

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getListUsersSQL () : string

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getListViewsSQL ($database) : string

Returns the SQL to list all views of a database or user.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getLocateExpression ($str, $substr, $startPos = false) : string

Returns the SQL snippet to get the position of the first occurrence of substring $substr in string $str.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getMaxIdentifierLength () : int

Maximum length of any given database identifier, like tables or column names.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getMd5Expression ($column) : string

Returns the SQL snippet to get the md5 sum of a field.

Note: Not SQL92, but common functionality.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getName () : string

Gets the name of the platform.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getPrimaryKeyDeclarationSQL ($index, $name = null) : string

Obtain DBMS specific SQL code portion needed to set a primary key
declaration to be used in statements like ALTER TABLE.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getSetTransactionIsolationSQL ($level) : string

Returns the SQL to set the transaction isolation level.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getSmallIntTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a 2 byte integer column.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getStartDatabaseSQL ($database) : string

Returns the SQL statement for starting an existing database.

In SQL Anywhere you can start and stop databases on a
database server instance.
This is a required statement after having created a new database
as it has to be explicitly started to be usable.
SQL Anywhere does not automatically start a database after creation!

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getStopDatabaseSQL ($database) : string

Returns the SQL statement for stopping a running database.

In SQL Anywhere you can start and stop databases on a
database server instance.
This is a required statement before dropping an existing database
as it has to be explicitly stopped before it can be dropped.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getSubstringExpression ($value, $from, $length = null) : string

Returns a SQL snippet to get a substring inside an SQL statement.

Note: Not SQL92, but common functionality.

SQLite only supports the 2 parameter variant of this function.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getTemporaryTableSQL () : string

Returns the required SQL string that fits between CREATE ... TABLE
to create the table as a temporary table.

Should be overridden in driver classes to return the correct string for the
specific database type.

The default is to return the string "TEMPORARY" - this will result in a
SQL error for any database that does not support temporary tables, or that
requires a different SQL command from "CREATE TEMPORARY TABLE".

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored time value of this platform.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create time fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getTrimExpression ($str, $pos = Doctrine\DBAL\Platforms\TrimMode::UNSPECIFIED, $char = false) : string

Returns the SQL snippet to trim a string.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getTruncateTableSQL ($tableName, $cascade = false) : string

Generates a Truncate Table SQL statement for a given table.

Cascade is not supported on many platforms but would optionally cascade the truncate by
following the foreign keys.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getUniqueConstraintDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set a unique
constraint declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getVarcharDefaultLength () : int

Gets the default length of a varchar field.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getVarcharMaxLength () : int

Gets the maximum length of a varchar field.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::hasNativeGuidType () : bool

Does this platform have native guid type.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::prefersIdentityColumns () : bool

Whether the platform prefers identity columns (eg. autoincrement) for ID generation.
Subclasses should override this method to return TRUE if they prefer identity columns.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::supportsCommentOnStatement () : bool

Whether this platform support the proprietary syntax "COMMENT ON asset".

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::supportsIdentityColumns () : bool

Whether the platform supports identity columns.

Identity columns are columns that receive an auto-generated value from the
database on insert of a row.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::_getCommonIntegerTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares common properties of an integer column.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::_getCreateTableSQL ($tableName, $columns, $options = []) : string[]

Returns the SQL used to create a table.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::_getTransactionIsolationLevelSQL ($level) : string

Returns the SQL for a given transaction isolation level Connection constant.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::doModifyLimitQuery ($query, $limit, $offset) : string

Adds an platform-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getAdvancedIndexOptionsSQL ($index) : string

Return the INDEX query section dealing with non-standard
SQL Anywhere options.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getBinaryTypeDeclarationSQLSnippet ($length, $fixed) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getTableConstraintDeclarationSQL ($constraint, $name = null) : string

Returns the SQL snippet for creating a table constraint.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getCreateIndexSQLFlags ($index) : string

Adds additional flags for index generation.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getRenameIndexSQL ($oldIndexName, $index, $tableName) : string[]

Returns the SQL for renaming an index on a table.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getReservedKeywordsClass () : string

Returns the class name of the reserved keywords list.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getVarcharTypeDeclarationSQLSnippet ($length, $fixed) : string

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::initializeDoctrineTypeMappings () : void

Lazy load Doctrine Type Mappings.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::__construct () : void

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::setEventManager ($eventManager) : void

Sets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getEventManager () : Doctrine\Common\EventManager

Gets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getVarcharTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a VARCHAR column type.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getBinaryTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getJsonTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a JSON field.

By default this maps directly to a CLOB and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::registerDoctrineTypeMapping ($dbType, $doctrineType) : void

Registers a doctrine type to be used in conjunction with a column type of this platform.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDoctrineTypeMapping ($dbType) : string

Gets the Doctrine type that is mapped for the given database column type.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::hasDoctrineTypeMappingFor ($dbType) : bool

Checks if a database type is currently supported by this platform.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::initializeCommentedDoctrineTypes () : void

Initializes the Doctrine Type comments instance variable for in_array() checks.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::isCommentedDoctrineType ($doctrineType) : bool

Is it necessary for the platform to add a parsable type comment to allow reverse engineering the given type?

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::markDoctrineTypeCommented ($doctrineType) : void

Marks this type as to be commented in ALTER TABLE and CREATE TABLE statements.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDoctrineTypeComment ($doctrineType) : string

Gets the comment to append to a column comment that helps parsing this type in reverse engineering.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getColumnComment ($column) : stringnull

Gets the comment of a passed column modified by potential doctrine type comment hints.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getIdentifierQuoteCharacter () : string

Gets the character used for identifier quoting.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getSqlCommentStartString () : string

Gets the string portion that starts an SQL comment.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getSqlCommentEndString () : string

Gets the string portion that ends an SQL comment.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getCharMaxLength () : int

Gets the maximum length of a char field.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getWildcards () : string[]

Gets all SQL wildcard characters of the platform.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getRegexpExpression () : string

Returns the regular expression operator.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getAvgExpression ($column) : string

Returns the SQL snippet to get the average value of a column.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getCountExpression ($column) : string

Returns the SQL snippet to get the number of rows (without a NULL value) of a column.

If a '*' is used instead of a column the number of selected rows is returned.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getMaxExpression ($column) : string

Returns the SQL snippet to get the highest value of a column.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getMinExpression ($column) : string

Returns the SQL snippet to get the lowest value of a column.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getSumExpression ($column) : string

Returns the SQL snippet to get the total sum of a column.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getLengthExpression ($column) : string

Returns the SQL snippet to get the length of a text field.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getSqrtExpression ($column) : string

Returns the SQL snippet to get the squared value of a column.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getRoundExpression ($column, $decimals = 0) : string

Returns the SQL snippet to round a numeric field to the number of decimals specified.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getModExpression ($expression1, $expression2) : string

Returns the SQL snippet to get the remainder of the division operation $expression1 / $expression2.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getRtrimExpression ($str) : string

Returns the SQL snippet to trim trailing space characters from the expression.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getLtrimExpression ($str) : string

Returns the SQL snippet to trim leading space characters from the expression.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getUpperExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to uppercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getLowerExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to lowercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getNowExpression () : string

Returns the SQL snippet to get the current system date.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getNotExpression ($expression) : string

Returns the SQL for a logical not.

Example:

$q = new Doctrine_Query();
$e = $q->expr;
$q->select('*')->from('table')
->where($e->eq('id', $e->not('null'));

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getIsNullExpression ($expression) : string

Returns the SQL that checks if an expression is null.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getIsNotNullExpression ($expression) : string

Returns the SQL that checks if an expression is not null.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getBetweenExpression ($expression, $value1, $value2) : string

Returns the SQL that checks if an expression evaluates to a value between two values.

The parameter $expression is checked if it is between $value1 and $value2.

Note: There is a slight difference in the way BETWEEN works on some databases.
http://www.w3schools.com/sql/sql_between.asp. If you want complete database
independence you should avoid using between().

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getAcosExpression ($value) : string

Returns the SQL to get the arccosine of a value.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getSinExpression ($value) : string

Returns the SQL to get the sine of a value.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getPiExpression () : string

Returns the SQL to get the PI value.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getCosExpression ($value) : string

Returns the SQL to get the cosine of a value.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDateAddSecondsExpression ($date, $seconds) : string

Returns the SQL to add the number of given seconds to a date.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDateSubSecondsExpression ($date, $seconds) : string

Returns the SQL to subtract the number of given seconds from a date.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDateAddMinutesExpression ($date, $minutes) : string

Returns the SQL to add the number of given minutes to a date.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDateSubMinutesExpression ($date, $minutes) : string

Returns the SQL to subtract the number of given minutes from a date.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDateAddHourExpression ($date, $hours) : string

Returns the SQL to add the number of given hours to a date.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDateSubHourExpression ($date, $hours) : string

Returns the SQL to subtract the number of given hours to a date.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDateAddDaysExpression ($date, $days) : string

Returns the SQL to add the number of given days to a date.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDateSubDaysExpression ($date, $days) : string

Returns the SQL to subtract the number of given days to a date.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDateAddWeeksExpression ($date, $weeks) : string

Returns the SQL to add the number of given weeks to a date.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDateSubWeeksExpression ($date, $weeks) : string

Returns the SQL to subtract the number of given weeks from a date.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDateAddMonthExpression ($date, $months) : string

Returns the SQL to add the number of given months to a date.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDateSubMonthExpression ($date, $months) : string

Returns the SQL to subtract the number of given months to a date.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDateAddQuartersExpression ($date, $quarters) : string

Returns the SQL to add the number of given quarters to a date.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDateSubQuartersExpression ($date, $quarters) : string

Returns the SQL to subtract the number of given quarters from a date.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDateAddYearsExpression ($date, $years) : string

Returns the SQL to add the number of given years to a date.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDateSubYearsExpression ($date, $years) : string

Returns the SQL to subtract the number of given years from a date.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getBitAndComparisonExpression ($value1, $value2) : string

Returns the SQL bit AND comparison expression.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getBitOrComparisonExpression ($value1, $value2) : string

Returns the SQL bit OR comparison expression.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getReadLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which locks rows in shared read lock.

This defaults to the ANSI SQL "FOR UPDATE", which is an exclusive lock (Write). Some database
vendors allow to lighten this constraint up to be a real read lock.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getWriteLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which obtains an exclusive lock on the rows.

The semantics of this lock mode should equal the SELECT .. FOR UPDATE of the ANSI SQL standard.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDropTableSQL ($table) : string

Returns the SQL snippet to drop an existing table.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDropTemporaryTableSQL ($table) : string

Returns the SQL to safely drop a temporary table WITHOUT implicitly committing an open transaction.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDropConstraintSQL ($constraint, $table) : string

Returns the SQL to drop a constraint.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDropForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to drop a foreign key.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getCreateTableSQL ($table, $createFlags = self::CREATE_INDEXES) : string[]

Returns the SQL statement(s) to create a table with the specified name, columns and constraints
on this platform.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getCommentOnTableSQL ($tableName, $comment) : string

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getInlineColumnCommentSQL ($comment) : string

Returns the SQL to create inline comment on a column.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getCreateSequenceSQL ($sequence) : string

Returns the SQL to create a sequence on this platform.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getAlterSequenceSQL ($sequence) : string

Returns the SQL to change a sequence on this platform.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getPartialIndexSQL ($index) : string

Adds condition for partial index.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getCreateSchemaSQL ($schemaName) : string

Returns the SQL to create a named schema.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::quoteIdentifier ($str) : string

Quotes a string so that it can be safely used as a table or column name,
even if it is a reserved word of the platform. This also detects identifier
chains separated by dot and quotes them independently.

NOTE: Just because you CAN use quoted identifiers doesn't mean
you SHOULD use them. In general, they end up causing way more
problems than they solve.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::quoteSingleIdentifier ($str) : string

Quotes a single identifier (no dot chain separation).

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getCreateForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to create a new foreign key.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::onSchemaAlterTableAddColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::onSchemaAlterTableRemoveColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::onSchemaAlterTableChangeColumn ($columnDiff, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::onSchemaAlterTableRenameColumn ($oldColumnName, $column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::onSchemaAlterTable ($diff, &$sql) : bool

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getPreAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getPostAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::_getAlterTableIndexForeignKeySQL ($diff) : string[]

Common code for alter table statement generation that updates the changed Index and Foreign Key definitions.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getColumnDeclarationListSQL ($fields) : string

Gets declaration of a number of fields in bulk.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getColumnDeclarationSQL ($name, $field) : string

Obtains DBMS specific SQL code portion needed to declare a generic type
field to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDecimalTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a floating point column of arbitrary precision.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDefaultValueDeclarationSQL ($field) : string

Obtains DBMS specific SQL code portion needed to set a default value
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getCheckDeclarationSQL ($definition) : string

Obtains DBMS specific SQL code portion needed to set a CHECK constraint
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getCustomTypeDeclarationSQL ($columnDef) : string

Obtains SQL code portion needed to create a custom column,
e.g. when a field has the "columnDefinition" keyword.
Only "AUTOINCREMENT" and "PRIMARY KEY" are added if appropriate.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getIndexFieldDeclarationListSQL ($columnsOrIndex) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getTemporaryTableName ($tableName) : string

Some vendors require temporary table names to be qualified specially.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getForeignKeyDeclarationSQL ($foreignKey) : string

Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getUniqueFieldDeclarationSQL () : string

Obtains DBMS specific SQL code portion needed to set the UNIQUE constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getColumnCharsetDeclarationSQL ($charset) : string

Obtains DBMS specific SQL code portion needed to set the CHARACTER SET
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getColumnCollationDeclarationSQL ($collation) : string

Obtains DBMS specific SQL code portion needed to set the COLLATION
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::prefersSequences () : bool

Whether the platform prefers sequences for ID generation.
Subclasses should override this method to return TRUE if they prefer sequences.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::convertBooleans ($item) : mixed

Some platforms need the boolean values to be converted.

The default conversion in this implementation converts to integers (false => 0, true => 1).

Note: if the input is not a boolean the original input might be returned.

There are two contexts when converting booleans: Literals and Prepared Statements.
This method should handle the literal case

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::convertFromBoolean ($item) : boolnull

Some platforms have boolean literals that needs to be correctly converted

The default conversion tries to convert value into bool "(bool)$item"

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::convertBooleansToDatabaseValue ($item) : mixed

This method should handle the prepared statements case. When there is no
distinction, it's OK to use the same method.

Note: if the input is not a boolean the original input might be returned.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getListNamespacesSQL () : string

Returns the SQL statement for retrieving the namespaces defined in the database.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getListSequencesSQL ($database) : string

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDropSequenceSQL ($sequence) : string

Returns the SQL snippet to drop an existing sequence.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getSequenceNextValSQL ($sequenceName) : string

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDateTimeTzTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime with timezone offset fields.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getFloatDeclarationSQL ($fieldDeclaration) : string

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::supportsSequences () : bool

Whether the platform supports sequences.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::usesSequenceEmulatedIdentityColumns () : bool

Whether the platform emulates identity columns through sequences.

Some platforms that do not support identity columns natively
but support sequences can emulate identity columns by using
sequences.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getIdentitySequenceName ($tableName, $columnName) : string

Returns the name of the sequence for a particular identity column in a particular table.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::supportsIndexes () : bool

Whether the platform supports indexes.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::supportsPartialIndexes () : bool

Whether the platform supports partial indexes.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::supportsColumnLengthIndexes () : bool

Whether the platform supports indexes with column length definitions.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::supportsAlterTable () : bool

Whether the platform supports altering tables.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::supportsTransactions () : bool

Whether the platform supports transactions.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::supportsSavepoints () : bool

Whether the platform supports savepoints.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::supportsReleaseSavepoints () : bool

Whether the platform supports releasing savepoints.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::supportsPrimaryConstraints () : bool

Whether the platform supports primary key constraints.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::supportsForeignKeyConstraints () : bool

Whether the platform supports foreign key constraints.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::supportsForeignKeyOnUpdate () : bool

Whether this platform supports onUpdate in foreign key constraints.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::supportsSchemas () : bool

Whether the platform supports database schemas.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::canEmulateSchemas () : bool

Whether this platform can emulate schemas.

Platforms that either support or emulate schemas don't automatically
filter a schema for the namespaced elements in {@link
AbstractManager#createSchema}.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDefaultSchemaName () : string

Returns the default schema name.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::supportsCreateDropDatabase () : bool

Whether this platform supports create database.

Some databases don't allow to create and drop databases at all or only with certain tools.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::supportsGettingAffectedRows () : bool

Whether the platform supports getting the affected rows of a recent update/delete type query.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::supportsInlineColumnComments () : bool

Whether this platform support to add inline column comments as postfix.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::hasNativeJsonType () : bool

Does this platform have native JSON type.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getIdentityColumnNullInsertSQL () : void

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::supportsViews () : bool

Whether this platform supports views.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::supportsColumnCollation () : bool

Does this platform support column collation?

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDateFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored date value of this platform.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::modifyLimitQuery ($query, $limit, $offset = null) : string

Adds an driver-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::supportsLimitOffset () : bool

Whether the database platform support offsets in modify limit clauses.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getSQLResultCasing ($column) : string

Gets the character casing of a column in an SQL result set of this platform.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getEmptyIdentityInsertSQL ($tableName, $identifierColumnName) : string

Returns the insert SQL for an empty insert statement.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getDummySelectSQL () : string

This is for test reasons, many vendors have special requirements for dummy statements.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::createSavePoint ($savepoint) : string

Returns the SQL to create a new savepoint.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::releaseSavePoint ($savepoint) : string

Returns the SQL to release a savepoint.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::rollbackSavePoint ($savepoint) : string

Returns the SQL to rollback a savepoint.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getReservedKeywordsList () : Doctrine\DBAL\Platforms\Keywords\KeywordList

Returns the keyword list instance of this platform.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::quoteStringLiteral ($str) : string

Quotes a literal string.
This method is NOT meant to fix SQL injections!
It is only meant to escape this platform's string literal
quote character inside the given literal string.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getStringLiteralQuoteCharacter () : string

Gets the character used for string literal quoting.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::escapeStringForLike ($inputString, $escapeChar) : string

Escapes metacharacters in a string intended to be used with a LIKE
operator.

method Doctrine\DBAL\Platforms\SQLAnywherePlatform::getLikeWildcardCharacters () : string

class Doctrine\DBAL\Platforms::SQLAnywhere11Platform

The SQLAnywhere11Platform provides the behavior, features and SQL dialect of the
SAP Sybase SQL Anywhere 11 database platform.

classconstant integer Doctrine\DBAL\Platforms\SQLAnywhere11Platform::FOREIGN_KEY_MATCH_SIMPLE

classconstant integer Doctrine\DBAL\Platforms\SQLAnywhere11Platform::FOREIGN_KEY_MATCH_FULL

classconstant integer Doctrine\DBAL\Platforms\SQLAnywhere11Platform::FOREIGN_KEY_MATCH_SIMPLE_UNIQUE

classconstant integer Doctrine\DBAL\Platforms\SQLAnywhere11Platform::FOREIGN_KEY_MATCH_FULL_UNIQUE

classconstant integer Doctrine\DBAL\Platforms\SQLAnywhere11Platform::CREATE_INDEXES

classconstant integer Doctrine\DBAL\Platforms\SQLAnywhere11Platform::CREATE_FOREIGNKEYS

classconstant string Doctrine\DBAL\Platforms\SQLAnywhere11Platform::DATE_INTERVAL_UNIT_SECOND

classconstant string Doctrine\DBAL\Platforms\SQLAnywhere11Platform::DATE_INTERVAL_UNIT_MINUTE

classconstant string Doctrine\DBAL\Platforms\SQLAnywhere11Platform::DATE_INTERVAL_UNIT_HOUR

classconstant string Doctrine\DBAL\Platforms\SQLAnywhere11Platform::DATE_INTERVAL_UNIT_DAY

classconstant string Doctrine\DBAL\Platforms\SQLAnywhere11Platform::DATE_INTERVAL_UNIT_WEEK

classconstant string Doctrine\DBAL\Platforms\SQLAnywhere11Platform::DATE_INTERVAL_UNIT_MONTH

classconstant string Doctrine\DBAL\Platforms\SQLAnywhere11Platform::DATE_INTERVAL_UNIT_QUARTER

classconstant string Doctrine\DBAL\Platforms\SQLAnywhere11Platform::DATE_INTERVAL_UNIT_YEAR

classconstant integer Doctrine\DBAL\Platforms\SQLAnywhere11Platform::TRIM_UNSPECIFIED

classconstant integer Doctrine\DBAL\Platforms\SQLAnywhere11Platform::TRIM_LEADING

classconstant integer Doctrine\DBAL\Platforms\SQLAnywhere11Platform::TRIM_TRAILING

classconstant integer Doctrine\DBAL\Platforms\SQLAnywhere11Platform::TRIM_BOTH

property string[]null Doctrine\DBAL\Platforms\SQLAnywhere11Platform::doctrineTypeMapping

property string[]null Doctrine\DBAL\Platforms\SQLAnywhere11Platform::doctrineTypeComments

Contains a list of all columns that should generate parseable column comments for type-detection
in reverse engineering scenarios.

property Doctrine\Common\EventManager Doctrine\DBAL\Platforms\SQLAnywhere11Platform::_eventManager

property Doctrine\DBAL\Platforms\Keywords\KeywordListnull Doctrine\DBAL\Platforms\SQLAnywhere11Platform::_keywords

Holds the KeywordList instance for the current platform.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getRegexpExpression () : string

Returns the regular expression operator.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getReservedKeywordsClass () : string

Returns the class name of the reserved keywords list.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::appendLockHint ($fromClause, $lockMode) : string

Honors that some SQL vendors such as MsSql use table hints for locking instead of the ANSI SQL FOR UPDATE specification.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::fixSchemaElementName ($schemaElementName) : string

Makes any fixes to a name of a schema element (table, sequence, ...) that are required
by restrictions of the platform, like a maximum length.

SQL Anywhere supports a maximum length of 128 bytes for identifiers.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getAdvancedForeignKeyOptionsSQL ($foreignKey) : string

Returns the FOREIGN KEY query section dealing with non-standard options
as MATCH, INITIALLY DEFERRED, ON UPDATE, ...

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getAlterTableSQL ($diff) : string[]

Gets the SQL statements for altering an existing table.

This method returns an array of SQL statements, since some platforms need several statements.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getAlterTableAddColumnClause ($column) : string

Returns the SQL clause for creating a column in a table alteration.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getAlterTableClause ($tableName) : string

Returns the SQL clause for altering a table.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getAlterTableRemoveColumnClause ($column) : string

Returns the SQL clause for dropping a column in a table alteration.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getAlterTableRenameColumnClause ($oldColumnName, $column) : string

Returns the SQL clause for renaming a column in a table alteration.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getAlterTableRenameTableClause ($newTableName) : string

Returns the SQL clause for renaming a table in a table alteration.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getAlterTableChangeColumnClause ($columnDiff) : stringnull

Returns the SQL clause for altering a column in a table alteration.

This method returns null in case that only the column comment has changed.
Changes in column comments have to be handled differently.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getBigIntTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares an 8 byte integer column.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getBinaryDefaultLength () : int

Gets the default length of a binary field.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getBinaryMaxLength () : int

Gets the maximum length of a binary field.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getBlobTypeDeclarationSQL ($field) : string

Returns the SQL Snippet used to declare a BLOB column type.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getBooleanTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a boolean column.

BIT type columns require an explicit NULL declaration
in SQL Anywhere if they shall be nullable.
Otherwise by just omitting the NOT NULL clause,
SQL Anywhere will declare them NOT NULL nonetheless.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getClobTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a CLOB column type.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getCommentOnColumnSQL ($tableName, $columnName, $comment) : string

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getConcatExpression () : string

Returns a SQL snippet to concatenate the given expressions.

Accepts an arbitrary number of string parameters. Each parameter must contain an expression.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getCreateConstraintSQL ($constraint, $table) : string

Returns the SQL to create a constraint on a table on this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getCreateDatabaseSQL ($database) : string

Returns the SQL to create a new database.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getCreateIndexSQL ($index, $table) : string

Returns the SQL to create an index on a table on this platform.

Appends SQL Anywhere specific flags if given.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getCreatePrimaryKeySQL ($index, $table) : string

Returns the SQL to create an unnamed primary key constraint.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getCreateTemporaryTableSnippetSQL () : string

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getCreateViewSQL ($name, $sql) : string

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getCurrentDateSQL () : string

Returns the SQL specific for the platform to get the current date.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getCurrentTimeSQL () : string

Returns the SQL specific for the platform to get the current time.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getCurrentTimestampSQL () : string

Returns the SQL specific for the platform to get the current timestamp

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDateArithmeticIntervalExpression ($date, $operator, $interval, $unit) : string

Returns the SQL for a date arithmetic expression.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDateDiffExpression ($date1, $date2) : string

Returns the SQL to calculate the difference in days between the two passed dates.

Computes diff = date1 - date2.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDateTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime value of this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDateTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime fields in
statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDateTimeTzFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime with timezone value of this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDateTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create date fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDefaultTransactionIsolationLevel () : int

Gets the default transaction isolation level of the platform.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDropDatabaseSQL ($database) : string

Returns the SQL snippet to drop an existing database.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDropIndexSQL ($index, $table = null) : string

Returns the SQL to drop an index from a table.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDropViewSQL ($name) : string

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getForeignKeyBaseDeclarationSQL ($foreignKey) : string

Obtains DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getForeignKeyMatchClauseSQL ($type) : string

Returns foreign key MATCH clause for given type.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getForeignKeyReferentialActionSQL ($action) : string

Returns the given referential action in uppercase if valid, otherwise throws an exception.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getForUpdateSQL () : string

Returns the FOR UPDATE expression.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getGuidExpression () : string

Returns the global unique identifier expression.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getGuidTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a GUID/UUID field.

By default this maps directly to a CHAR(36) and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getIndexDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getIntegerTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a 4 byte integer column.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getListDatabasesSQL () : string

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getListTableColumnsSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getListTableConstraintsSQL ($table) : string

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getListTableForeignKeysSQL ($table) : string

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getListTableIndexesSQL ($table, $currentDatabase = null) : string

Returns the list of indexes for the current database.

The current database parameter is optional but will always be passed
when using the SchemaManager API and is the database the given table is in.

Attention: Some platforms only support currentDatabase when they
are connected with that database. Cross-database information schema
requests may be impossible.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getListTablesSQL () : string

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getListUsersSQL () : string

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getListViewsSQL ($database) : string

Returns the SQL to list all views of a database or user.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getLocateExpression ($str, $substr, $startPos = false) : string

Returns the SQL snippet to get the position of the first occurrence of substring $substr in string $str.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getMaxIdentifierLength () : int

Maximum length of any given database identifier, like tables or column names.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getMd5Expression ($column) : string

Returns the SQL snippet to get the md5 sum of a field.

Note: Not SQL92, but common functionality.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getName () : string

Gets the name of the platform.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getPrimaryKeyDeclarationSQL ($index, $name = null) : string

Obtain DBMS specific SQL code portion needed to set a primary key
declaration to be used in statements like ALTER TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getSetTransactionIsolationSQL ($level) : string

Returns the SQL to set the transaction isolation level.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getSmallIntTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a 2 byte integer column.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getStartDatabaseSQL ($database) : string

Returns the SQL statement for starting an existing database.

In SQL Anywhere you can start and stop databases on a
database server instance.
This is a required statement after having created a new database
as it has to be explicitly started to be usable.
SQL Anywhere does not automatically start a database after creation!

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getStopDatabaseSQL ($database) : string

Returns the SQL statement for stopping a running database.

In SQL Anywhere you can start and stop databases on a
database server instance.
This is a required statement before dropping an existing database
as it has to be explicitly stopped before it can be dropped.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getSubstringExpression ($value, $from, $length = null) : string

Returns a SQL snippet to get a substring inside an SQL statement.

Note: Not SQL92, but common functionality.

SQLite only supports the 2 parameter variant of this function.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getTemporaryTableSQL () : string

Returns the required SQL string that fits between CREATE ... TABLE
to create the table as a temporary table.

Should be overridden in driver classes to return the correct string for the
specific database type.

The default is to return the string "TEMPORARY" - this will result in a
SQL error for any database that does not support temporary tables, or that
requires a different SQL command from "CREATE TEMPORARY TABLE".

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored time value of this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create time fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getTrimExpression ($str, $pos = Doctrine\DBAL\Platforms\TrimMode::UNSPECIFIED, $char = false) : string

Returns the SQL snippet to trim a string.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getTruncateTableSQL ($tableName, $cascade = false) : string

Generates a Truncate Table SQL statement for a given table.

Cascade is not supported on many platforms but would optionally cascade the truncate by
following the foreign keys.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getUniqueConstraintDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set a unique
constraint declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getVarcharDefaultLength () : int

Gets the default length of a varchar field.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getVarcharMaxLength () : int

Gets the maximum length of a varchar field.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::hasNativeGuidType () : bool

Does this platform have native guid type.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::prefersIdentityColumns () : bool

Whether the platform prefers identity columns (eg. autoincrement) for ID generation.
Subclasses should override this method to return TRUE if they prefer identity columns.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::supportsCommentOnStatement () : bool

Whether this platform support the proprietary syntax "COMMENT ON asset".

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::supportsIdentityColumns () : bool

Whether the platform supports identity columns.

Identity columns are columns that receive an auto-generated value from the
database on insert of a row.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::_getCommonIntegerTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares common properties of an integer column.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::_getCreateTableSQL ($tableName, $columns, $options = []) : string[]

Returns the SQL used to create a table.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::_getTransactionIsolationLevelSQL ($level) : string

Returns the SQL for a given transaction isolation level Connection constant.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::doModifyLimitQuery ($query, $limit, $offset) : string

Adds an platform-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getAdvancedIndexOptionsSQL ($index) : string

Return the INDEX query section dealing with non-standard
SQL Anywhere options.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getBinaryTypeDeclarationSQLSnippet ($length, $fixed) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getTableConstraintDeclarationSQL ($constraint, $name = null) : string

Returns the SQL snippet for creating a table constraint.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getCreateIndexSQLFlags ($index) : string

Adds additional flags for index generation.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getRenameIndexSQL ($oldIndexName, $index, $tableName) : string[]

Returns the SQL for renaming an index on a table.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getVarcharTypeDeclarationSQLSnippet ($length, $fixed) : string

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::initializeDoctrineTypeMappings () : void

Lazy load Doctrine Type Mappings.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::__construct () : void

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::setEventManager ($eventManager) : void

Sets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getEventManager () : Doctrine\Common\EventManager

Gets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getVarcharTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a VARCHAR column type.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getBinaryTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getJsonTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a JSON field.

By default this maps directly to a CLOB and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::registerDoctrineTypeMapping ($dbType, $doctrineType) : void

Registers a doctrine type to be used in conjunction with a column type of this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDoctrineTypeMapping ($dbType) : string

Gets the Doctrine type that is mapped for the given database column type.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::hasDoctrineTypeMappingFor ($dbType) : bool

Checks if a database type is currently supported by this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::initializeCommentedDoctrineTypes () : void

Initializes the Doctrine Type comments instance variable for in_array() checks.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::isCommentedDoctrineType ($doctrineType) : bool

Is it necessary for the platform to add a parsable type comment to allow reverse engineering the given type?

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::markDoctrineTypeCommented ($doctrineType) : void

Marks this type as to be commented in ALTER TABLE and CREATE TABLE statements.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDoctrineTypeComment ($doctrineType) : string

Gets the comment to append to a column comment that helps parsing this type in reverse engineering.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getColumnComment ($column) : stringnull

Gets the comment of a passed column modified by potential doctrine type comment hints.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getIdentifierQuoteCharacter () : string

Gets the character used for identifier quoting.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getSqlCommentStartString () : string

Gets the string portion that starts an SQL comment.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getSqlCommentEndString () : string

Gets the string portion that ends an SQL comment.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getCharMaxLength () : int

Gets the maximum length of a char field.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getWildcards () : string[]

Gets all SQL wildcard characters of the platform.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getAvgExpression ($column) : string

Returns the SQL snippet to get the average value of a column.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getCountExpression ($column) : string

Returns the SQL snippet to get the number of rows (without a NULL value) of a column.

If a '*' is used instead of a column the number of selected rows is returned.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getMaxExpression ($column) : string

Returns the SQL snippet to get the highest value of a column.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getMinExpression ($column) : string

Returns the SQL snippet to get the lowest value of a column.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getSumExpression ($column) : string

Returns the SQL snippet to get the total sum of a column.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getLengthExpression ($column) : string

Returns the SQL snippet to get the length of a text field.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getSqrtExpression ($column) : string

Returns the SQL snippet to get the squared value of a column.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getRoundExpression ($column, $decimals = 0) : string

Returns the SQL snippet to round a numeric field to the number of decimals specified.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getModExpression ($expression1, $expression2) : string

Returns the SQL snippet to get the remainder of the division operation $expression1 / $expression2.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getRtrimExpression ($str) : string

Returns the SQL snippet to trim trailing space characters from the expression.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getLtrimExpression ($str) : string

Returns the SQL snippet to trim leading space characters from the expression.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getUpperExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to uppercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getLowerExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to lowercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getNowExpression () : string

Returns the SQL snippet to get the current system date.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getNotExpression ($expression) : string

Returns the SQL for a logical not.

Example:

$q = new Doctrine_Query();
$e = $q->expr;
$q->select('*')->from('table')
->where($e->eq('id', $e->not('null'));

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getIsNullExpression ($expression) : string

Returns the SQL that checks if an expression is null.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getIsNotNullExpression ($expression) : string

Returns the SQL that checks if an expression is not null.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getBetweenExpression ($expression, $value1, $value2) : string

Returns the SQL that checks if an expression evaluates to a value between two values.

The parameter $expression is checked if it is between $value1 and $value2.

Note: There is a slight difference in the way BETWEEN works on some databases.
http://www.w3schools.com/sql/sql_between.asp. If you want complete database
independence you should avoid using between().

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getAcosExpression ($value) : string

Returns the SQL to get the arccosine of a value.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getSinExpression ($value) : string

Returns the SQL to get the sine of a value.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getPiExpression () : string

Returns the SQL to get the PI value.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getCosExpression ($value) : string

Returns the SQL to get the cosine of a value.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDateAddSecondsExpression ($date, $seconds) : string

Returns the SQL to add the number of given seconds to a date.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDateSubSecondsExpression ($date, $seconds) : string

Returns the SQL to subtract the number of given seconds from a date.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDateAddMinutesExpression ($date, $minutes) : string

Returns the SQL to add the number of given minutes to a date.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDateSubMinutesExpression ($date, $minutes) : string

Returns the SQL to subtract the number of given minutes from a date.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDateAddHourExpression ($date, $hours) : string

Returns the SQL to add the number of given hours to a date.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDateSubHourExpression ($date, $hours) : string

Returns the SQL to subtract the number of given hours to a date.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDateAddDaysExpression ($date, $days) : string

Returns the SQL to add the number of given days to a date.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDateSubDaysExpression ($date, $days) : string

Returns the SQL to subtract the number of given days to a date.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDateAddWeeksExpression ($date, $weeks) : string

Returns the SQL to add the number of given weeks to a date.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDateSubWeeksExpression ($date, $weeks) : string

Returns the SQL to subtract the number of given weeks from a date.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDateAddMonthExpression ($date, $months) : string

Returns the SQL to add the number of given months to a date.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDateSubMonthExpression ($date, $months) : string

Returns the SQL to subtract the number of given months to a date.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDateAddQuartersExpression ($date, $quarters) : string

Returns the SQL to add the number of given quarters to a date.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDateSubQuartersExpression ($date, $quarters) : string

Returns the SQL to subtract the number of given quarters from a date.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDateAddYearsExpression ($date, $years) : string

Returns the SQL to add the number of given years to a date.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDateSubYearsExpression ($date, $years) : string

Returns the SQL to subtract the number of given years from a date.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getBitAndComparisonExpression ($value1, $value2) : string

Returns the SQL bit AND comparison expression.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getBitOrComparisonExpression ($value1, $value2) : string

Returns the SQL bit OR comparison expression.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getReadLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which locks rows in shared read lock.

This defaults to the ANSI SQL "FOR UPDATE", which is an exclusive lock (Write). Some database
vendors allow to lighten this constraint up to be a real read lock.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getWriteLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which obtains an exclusive lock on the rows.

The semantics of this lock mode should equal the SELECT .. FOR UPDATE of the ANSI SQL standard.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDropTableSQL ($table) : string

Returns the SQL snippet to drop an existing table.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDropTemporaryTableSQL ($table) : string

Returns the SQL to safely drop a temporary table WITHOUT implicitly committing an open transaction.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDropConstraintSQL ($constraint, $table) : string

Returns the SQL to drop a constraint.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDropForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to drop a foreign key.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getCreateTableSQL ($table, $createFlags = self::CREATE_INDEXES) : string[]

Returns the SQL statement(s) to create a table with the specified name, columns and constraints
on this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getCommentOnTableSQL ($tableName, $comment) : string

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getInlineColumnCommentSQL ($comment) : string

Returns the SQL to create inline comment on a column.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getCreateSequenceSQL ($sequence) : string

Returns the SQL to create a sequence on this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getAlterSequenceSQL ($sequence) : string

Returns the SQL to change a sequence on this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getPartialIndexSQL ($index) : string

Adds condition for partial index.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getCreateSchemaSQL ($schemaName) : string

Returns the SQL to create a named schema.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::quoteIdentifier ($str) : string

Quotes a string so that it can be safely used as a table or column name,
even if it is a reserved word of the platform. This also detects identifier
chains separated by dot and quotes them independently.

NOTE: Just because you CAN use quoted identifiers doesn't mean
you SHOULD use them. In general, they end up causing way more
problems than they solve.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::quoteSingleIdentifier ($str) : string

Quotes a single identifier (no dot chain separation).

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getCreateForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to create a new foreign key.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::onSchemaAlterTableAddColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::onSchemaAlterTableRemoveColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::onSchemaAlterTableChangeColumn ($columnDiff, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::onSchemaAlterTableRenameColumn ($oldColumnName, $column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::onSchemaAlterTable ($diff, &$sql) : bool

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getPreAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getPostAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::_getAlterTableIndexForeignKeySQL ($diff) : string[]

Common code for alter table statement generation that updates the changed Index and Foreign Key definitions.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getColumnDeclarationListSQL ($fields) : string

Gets declaration of a number of fields in bulk.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getColumnDeclarationSQL ($name, $field) : string

Obtains DBMS specific SQL code portion needed to declare a generic type
field to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDecimalTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a floating point column of arbitrary precision.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDefaultValueDeclarationSQL ($field) : string

Obtains DBMS specific SQL code portion needed to set a default value
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getCheckDeclarationSQL ($definition) : string

Obtains DBMS specific SQL code portion needed to set a CHECK constraint
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getCustomTypeDeclarationSQL ($columnDef) : string

Obtains SQL code portion needed to create a custom column,
e.g. when a field has the "columnDefinition" keyword.
Only "AUTOINCREMENT" and "PRIMARY KEY" are added if appropriate.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getIndexFieldDeclarationListSQL ($columnsOrIndex) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getTemporaryTableName ($tableName) : string

Some vendors require temporary table names to be qualified specially.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getForeignKeyDeclarationSQL ($foreignKey) : string

Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getUniqueFieldDeclarationSQL () : string

Obtains DBMS specific SQL code portion needed to set the UNIQUE constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getColumnCharsetDeclarationSQL ($charset) : string

Obtains DBMS specific SQL code portion needed to set the CHARACTER SET
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getColumnCollationDeclarationSQL ($collation) : string

Obtains DBMS specific SQL code portion needed to set the COLLATION
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::prefersSequences () : bool

Whether the platform prefers sequences for ID generation.
Subclasses should override this method to return TRUE if they prefer sequences.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::convertBooleans ($item) : mixed

Some platforms need the boolean values to be converted.

The default conversion in this implementation converts to integers (false => 0, true => 1).

Note: if the input is not a boolean the original input might be returned.

There are two contexts when converting booleans: Literals and Prepared Statements.
This method should handle the literal case

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::convertFromBoolean ($item) : boolnull

Some platforms have boolean literals that needs to be correctly converted

The default conversion tries to convert value into bool "(bool)$item"

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::convertBooleansToDatabaseValue ($item) : mixed

This method should handle the prepared statements case. When there is no
distinction, it's OK to use the same method.

Note: if the input is not a boolean the original input might be returned.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getListNamespacesSQL () : string

Returns the SQL statement for retrieving the namespaces defined in the database.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getListSequencesSQL ($database) : string

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDropSequenceSQL ($sequence) : string

Returns the SQL snippet to drop an existing sequence.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getSequenceNextValSQL ($sequenceName) : string

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDateTimeTzTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime with timezone offset fields.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getFloatDeclarationSQL ($fieldDeclaration) : string

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::supportsSequences () : bool

Whether the platform supports sequences.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::usesSequenceEmulatedIdentityColumns () : bool

Whether the platform emulates identity columns through sequences.

Some platforms that do not support identity columns natively
but support sequences can emulate identity columns by using
sequences.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getIdentitySequenceName ($tableName, $columnName) : string

Returns the name of the sequence for a particular identity column in a particular table.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::supportsIndexes () : bool

Whether the platform supports indexes.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::supportsPartialIndexes () : bool

Whether the platform supports partial indexes.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::supportsColumnLengthIndexes () : bool

Whether the platform supports indexes with column length definitions.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::supportsAlterTable () : bool

Whether the platform supports altering tables.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::supportsTransactions () : bool

Whether the platform supports transactions.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::supportsSavepoints () : bool

Whether the platform supports savepoints.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::supportsReleaseSavepoints () : bool

Whether the platform supports releasing savepoints.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::supportsPrimaryConstraints () : bool

Whether the platform supports primary key constraints.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::supportsForeignKeyConstraints () : bool

Whether the platform supports foreign key constraints.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::supportsForeignKeyOnUpdate () : bool

Whether this platform supports onUpdate in foreign key constraints.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::supportsSchemas () : bool

Whether the platform supports database schemas.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::canEmulateSchemas () : bool

Whether this platform can emulate schemas.

Platforms that either support or emulate schemas don't automatically
filter a schema for the namespaced elements in {@link
AbstractManager#createSchema}.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDefaultSchemaName () : string

Returns the default schema name.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::supportsCreateDropDatabase () : bool

Whether this platform supports create database.

Some databases don't allow to create and drop databases at all or only with certain tools.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::supportsGettingAffectedRows () : bool

Whether the platform supports getting the affected rows of a recent update/delete type query.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::supportsInlineColumnComments () : bool

Whether this platform support to add inline column comments as postfix.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::hasNativeJsonType () : bool

Does this platform have native JSON type.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getIdentityColumnNullInsertSQL () : void

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::supportsViews () : bool

Whether this platform supports views.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::supportsColumnCollation () : bool

Does this platform support column collation?

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDateFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored date value of this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::modifyLimitQuery ($query, $limit, $offset = null) : string

Adds an driver-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::supportsLimitOffset () : bool

Whether the database platform support offsets in modify limit clauses.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getSQLResultCasing ($column) : string

Gets the character casing of a column in an SQL result set of this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getEmptyIdentityInsertSQL ($tableName, $identifierColumnName) : string

Returns the insert SQL for an empty insert statement.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getDummySelectSQL () : string

This is for test reasons, many vendors have special requirements for dummy statements.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::createSavePoint ($savepoint) : string

Returns the SQL to create a new savepoint.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::releaseSavePoint ($savepoint) : string

Returns the SQL to release a savepoint.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::rollbackSavePoint ($savepoint) : string

Returns the SQL to rollback a savepoint.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getReservedKeywordsList () : Doctrine\DBAL\Platforms\Keywords\KeywordList

Returns the keyword list instance of this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::quoteStringLiteral ($str) : string

Quotes a literal string.
This method is NOT meant to fix SQL injections!
It is only meant to escape this platform's string literal
quote character inside the given literal string.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getStringLiteralQuoteCharacter () : string

Gets the character used for string literal quoting.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::escapeStringForLike ($inputString, $escapeChar) : string

Escapes metacharacters in a string intended to be used with a LIKE
operator.

method Doctrine\DBAL\Platforms\SQLAnywhere11Platform::getLikeWildcardCharacters () : string

class Doctrine\DBAL\Platforms::SQLAnywhere12Platform

The SQLAnywhere12Platform provides the behavior, features and SQL dialect of the
SAP Sybase SQL Anywhere 12 database platform.

classconstant integer Doctrine\DBAL\Platforms\SQLAnywhere12Platform::FOREIGN_KEY_MATCH_SIMPLE

classconstant integer Doctrine\DBAL\Platforms\SQLAnywhere12Platform::FOREIGN_KEY_MATCH_FULL

classconstant integer Doctrine\DBAL\Platforms\SQLAnywhere12Platform::FOREIGN_KEY_MATCH_SIMPLE_UNIQUE

classconstant integer Doctrine\DBAL\Platforms\SQLAnywhere12Platform::FOREIGN_KEY_MATCH_FULL_UNIQUE

classconstant integer Doctrine\DBAL\Platforms\SQLAnywhere12Platform::CREATE_INDEXES

classconstant integer Doctrine\DBAL\Platforms\SQLAnywhere12Platform::CREATE_FOREIGNKEYS

classconstant string Doctrine\DBAL\Platforms\SQLAnywhere12Platform::DATE_INTERVAL_UNIT_SECOND

classconstant string Doctrine\DBAL\Platforms\SQLAnywhere12Platform::DATE_INTERVAL_UNIT_MINUTE

classconstant string Doctrine\DBAL\Platforms\SQLAnywhere12Platform::DATE_INTERVAL_UNIT_HOUR

classconstant string Doctrine\DBAL\Platforms\SQLAnywhere12Platform::DATE_INTERVAL_UNIT_DAY

classconstant string Doctrine\DBAL\Platforms\SQLAnywhere12Platform::DATE_INTERVAL_UNIT_WEEK

classconstant string Doctrine\DBAL\Platforms\SQLAnywhere12Platform::DATE_INTERVAL_UNIT_MONTH

classconstant string Doctrine\DBAL\Platforms\SQLAnywhere12Platform::DATE_INTERVAL_UNIT_QUARTER

classconstant string Doctrine\DBAL\Platforms\SQLAnywhere12Platform::DATE_INTERVAL_UNIT_YEAR

classconstant integer Doctrine\DBAL\Platforms\SQLAnywhere12Platform::TRIM_UNSPECIFIED

classconstant integer Doctrine\DBAL\Platforms\SQLAnywhere12Platform::TRIM_LEADING

classconstant integer Doctrine\DBAL\Platforms\SQLAnywhere12Platform::TRIM_TRAILING

classconstant integer Doctrine\DBAL\Platforms\SQLAnywhere12Platform::TRIM_BOTH

property string[]null Doctrine\DBAL\Platforms\SQLAnywhere12Platform::doctrineTypeMapping

property string[]null Doctrine\DBAL\Platforms\SQLAnywhere12Platform::doctrineTypeComments

Contains a list of all columns that should generate parseable column comments for type-detection
in reverse engineering scenarios.

property Doctrine\Common\EventManager Doctrine\DBAL\Platforms\SQLAnywhere12Platform::_eventManager

property Doctrine\DBAL\Platforms\Keywords\KeywordListnull Doctrine\DBAL\Platforms\SQLAnywhere12Platform::_keywords

Holds the KeywordList instance for the current platform.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getCreateSequenceSQL ($sequence) : string

Returns the SQL to create a sequence on this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getAlterSequenceSQL ($sequence) : string

Returns the SQL to change a sequence on this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDateTimeTzFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime with timezone value of this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDateTimeTzTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime with timezone offset fields.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDropSequenceSQL ($sequence) : string

Returns the SQL snippet to drop an existing sequence.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getListSequencesSQL ($database) : string

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getSequenceNextValSQL ($sequenceName) : string

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::supportsSequences () : bool

Whether the platform supports sequences.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getAdvancedIndexOptionsSQL ($index) : string

Return the INDEX query section dealing with non-standard
SQL Anywhere options.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getReservedKeywordsClass () : string

Returns the class name of the reserved keywords list.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::initializeDoctrineTypeMappings () : void

Lazy load Doctrine Type Mappings.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getRegexpExpression () : string

Returns the regular expression operator.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::appendLockHint ($fromClause, $lockMode) : string

Honors that some SQL vendors such as MsSql use table hints for locking instead of the ANSI SQL FOR UPDATE specification.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::fixSchemaElementName ($schemaElementName) : string

Makes any fixes to a name of a schema element (table, sequence, ...) that are required
by restrictions of the platform, like a maximum length.

SQL Anywhere supports a maximum length of 128 bytes for identifiers.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getAdvancedForeignKeyOptionsSQL ($foreignKey) : string

Returns the FOREIGN KEY query section dealing with non-standard options
as MATCH, INITIALLY DEFERRED, ON UPDATE, ...

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getAlterTableSQL ($diff) : string[]

Gets the SQL statements for altering an existing table.

This method returns an array of SQL statements, since some platforms need several statements.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getAlterTableAddColumnClause ($column) : string

Returns the SQL clause for creating a column in a table alteration.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getAlterTableClause ($tableName) : string

Returns the SQL clause for altering a table.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getAlterTableRemoveColumnClause ($column) : string

Returns the SQL clause for dropping a column in a table alteration.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getAlterTableRenameColumnClause ($oldColumnName, $column) : string

Returns the SQL clause for renaming a column in a table alteration.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getAlterTableRenameTableClause ($newTableName) : string

Returns the SQL clause for renaming a table in a table alteration.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getAlterTableChangeColumnClause ($columnDiff) : stringnull

Returns the SQL clause for altering a column in a table alteration.

This method returns null in case that only the column comment has changed.
Changes in column comments have to be handled differently.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getBigIntTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares an 8 byte integer column.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getBinaryDefaultLength () : int

Gets the default length of a binary field.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getBinaryMaxLength () : int

Gets the maximum length of a binary field.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getBlobTypeDeclarationSQL ($field) : string

Returns the SQL Snippet used to declare a BLOB column type.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getBooleanTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a boolean column.

BIT type columns require an explicit NULL declaration
in SQL Anywhere if they shall be nullable.
Otherwise by just omitting the NOT NULL clause,
SQL Anywhere will declare them NOT NULL nonetheless.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getClobTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a CLOB column type.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getCommentOnColumnSQL ($tableName, $columnName, $comment) : string

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getConcatExpression () : string

Returns a SQL snippet to concatenate the given expressions.

Accepts an arbitrary number of string parameters. Each parameter must contain an expression.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getCreateConstraintSQL ($constraint, $table) : string

Returns the SQL to create a constraint on a table on this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getCreateDatabaseSQL ($database) : string

Returns the SQL to create a new database.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getCreateIndexSQL ($index, $table) : string

Returns the SQL to create an index on a table on this platform.

Appends SQL Anywhere specific flags if given.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getCreatePrimaryKeySQL ($index, $table) : string

Returns the SQL to create an unnamed primary key constraint.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getCreateTemporaryTableSnippetSQL () : string

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getCreateViewSQL ($name, $sql) : string

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getCurrentDateSQL () : string

Returns the SQL specific for the platform to get the current date.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getCurrentTimeSQL () : string

Returns the SQL specific for the platform to get the current time.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getCurrentTimestampSQL () : string

Returns the SQL specific for the platform to get the current timestamp

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDateArithmeticIntervalExpression ($date, $operator, $interval, $unit) : string

Returns the SQL for a date arithmetic expression.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDateDiffExpression ($date1, $date2) : string

Returns the SQL to calculate the difference in days between the two passed dates.

Computes diff = date1 - date2.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDateTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime value of this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDateTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime fields in
statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDateTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create date fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDefaultTransactionIsolationLevel () : int

Gets the default transaction isolation level of the platform.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDropDatabaseSQL ($database) : string

Returns the SQL snippet to drop an existing database.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDropIndexSQL ($index, $table = null) : string

Returns the SQL to drop an index from a table.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDropViewSQL ($name) : string

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getForeignKeyBaseDeclarationSQL ($foreignKey) : string

Obtains DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getForeignKeyMatchClauseSQL ($type) : string

Returns foreign key MATCH clause for given type.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getForeignKeyReferentialActionSQL ($action) : string

Returns the given referential action in uppercase if valid, otherwise throws an exception.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getForUpdateSQL () : string

Returns the FOR UPDATE expression.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getGuidExpression () : string

Returns the global unique identifier expression.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getGuidTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a GUID/UUID field.

By default this maps directly to a CHAR(36) and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getIndexDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getIntegerTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a 4 byte integer column.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getListDatabasesSQL () : string

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getListTableColumnsSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getListTableConstraintsSQL ($table) : string

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getListTableForeignKeysSQL ($table) : string

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getListTableIndexesSQL ($table, $currentDatabase = null) : string

Returns the list of indexes for the current database.

The current database parameter is optional but will always be passed
when using the SchemaManager API and is the database the given table is in.

Attention: Some platforms only support currentDatabase when they
are connected with that database. Cross-database information schema
requests may be impossible.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getListTablesSQL () : string

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getListUsersSQL () : string

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getListViewsSQL ($database) : string

Returns the SQL to list all views of a database or user.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getLocateExpression ($str, $substr, $startPos = false) : string

Returns the SQL snippet to get the position of the first occurrence of substring $substr in string $str.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getMaxIdentifierLength () : int

Maximum length of any given database identifier, like tables or column names.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getMd5Expression ($column) : string

Returns the SQL snippet to get the md5 sum of a field.

Note: Not SQL92, but common functionality.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getName () : string

Gets the name of the platform.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getPrimaryKeyDeclarationSQL ($index, $name = null) : string

Obtain DBMS specific SQL code portion needed to set a primary key
declaration to be used in statements like ALTER TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getSetTransactionIsolationSQL ($level) : string

Returns the SQL to set the transaction isolation level.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getSmallIntTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a 2 byte integer column.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getStartDatabaseSQL ($database) : string

Returns the SQL statement for starting an existing database.

In SQL Anywhere you can start and stop databases on a
database server instance.
This is a required statement after having created a new database
as it has to be explicitly started to be usable.
SQL Anywhere does not automatically start a database after creation!

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getStopDatabaseSQL ($database) : string

Returns the SQL statement for stopping a running database.

In SQL Anywhere you can start and stop databases on a
database server instance.
This is a required statement before dropping an existing database
as it has to be explicitly stopped before it can be dropped.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getSubstringExpression ($value, $from, $length = null) : string

Returns a SQL snippet to get a substring inside an SQL statement.

Note: Not SQL92, but common functionality.

SQLite only supports the 2 parameter variant of this function.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getTemporaryTableSQL () : string

Returns the required SQL string that fits between CREATE ... TABLE
to create the table as a temporary table.

Should be overridden in driver classes to return the correct string for the
specific database type.

The default is to return the string "TEMPORARY" - this will result in a
SQL error for any database that does not support temporary tables, or that
requires a different SQL command from "CREATE TEMPORARY TABLE".

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored time value of this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create time fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getTrimExpression ($str, $pos = Doctrine\DBAL\Platforms\TrimMode::UNSPECIFIED, $char = false) : string

Returns the SQL snippet to trim a string.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getTruncateTableSQL ($tableName, $cascade = false) : string

Generates a Truncate Table SQL statement for a given table.

Cascade is not supported on many platforms but would optionally cascade the truncate by
following the foreign keys.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getUniqueConstraintDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set a unique
constraint declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getVarcharDefaultLength () : int

Gets the default length of a varchar field.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getVarcharMaxLength () : int

Gets the maximum length of a varchar field.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::hasNativeGuidType () : bool

Does this platform have native guid type.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::prefersIdentityColumns () : bool

Whether the platform prefers identity columns (eg. autoincrement) for ID generation.
Subclasses should override this method to return TRUE if they prefer identity columns.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::supportsCommentOnStatement () : bool

Whether this platform support the proprietary syntax "COMMENT ON asset".

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::supportsIdentityColumns () : bool

Whether the platform supports identity columns.

Identity columns are columns that receive an auto-generated value from the
database on insert of a row.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::_getCommonIntegerTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares common properties of an integer column.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::_getCreateTableSQL ($tableName, $columns, $options = []) : string[]

Returns the SQL used to create a table.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::_getTransactionIsolationLevelSQL ($level) : string

Returns the SQL for a given transaction isolation level Connection constant.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::doModifyLimitQuery ($query, $limit, $offset) : string

Adds an platform-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getBinaryTypeDeclarationSQLSnippet ($length, $fixed) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getTableConstraintDeclarationSQL ($constraint, $name = null) : string

Returns the SQL snippet for creating a table constraint.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getCreateIndexSQLFlags ($index) : string

Adds additional flags for index generation.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getRenameIndexSQL ($oldIndexName, $index, $tableName) : string[]

Returns the SQL for renaming an index on a table.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getVarcharTypeDeclarationSQLSnippet ($length, $fixed) : string

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::__construct () : void

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::setEventManager ($eventManager) : void

Sets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getEventManager () : Doctrine\Common\EventManager

Gets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getVarcharTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a VARCHAR column type.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getBinaryTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getJsonTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a JSON field.

By default this maps directly to a CLOB and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::registerDoctrineTypeMapping ($dbType, $doctrineType) : void

Registers a doctrine type to be used in conjunction with a column type of this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDoctrineTypeMapping ($dbType) : string

Gets the Doctrine type that is mapped for the given database column type.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::hasDoctrineTypeMappingFor ($dbType) : bool

Checks if a database type is currently supported by this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::initializeCommentedDoctrineTypes () : void

Initializes the Doctrine Type comments instance variable for in_array() checks.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::isCommentedDoctrineType ($doctrineType) : bool

Is it necessary for the platform to add a parsable type comment to allow reverse engineering the given type?

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::markDoctrineTypeCommented ($doctrineType) : void

Marks this type as to be commented in ALTER TABLE and CREATE TABLE statements.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDoctrineTypeComment ($doctrineType) : string

Gets the comment to append to a column comment that helps parsing this type in reverse engineering.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getColumnComment ($column) : stringnull

Gets the comment of a passed column modified by potential doctrine type comment hints.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getIdentifierQuoteCharacter () : string

Gets the character used for identifier quoting.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getSqlCommentStartString () : string

Gets the string portion that starts an SQL comment.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getSqlCommentEndString () : string

Gets the string portion that ends an SQL comment.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getCharMaxLength () : int

Gets the maximum length of a char field.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getWildcards () : string[]

Gets all SQL wildcard characters of the platform.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getAvgExpression ($column) : string

Returns the SQL snippet to get the average value of a column.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getCountExpression ($column) : string

Returns the SQL snippet to get the number of rows (without a NULL value) of a column.

If a '*' is used instead of a column the number of selected rows is returned.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getMaxExpression ($column) : string

Returns the SQL snippet to get the highest value of a column.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getMinExpression ($column) : string

Returns the SQL snippet to get the lowest value of a column.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getSumExpression ($column) : string

Returns the SQL snippet to get the total sum of a column.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getLengthExpression ($column) : string

Returns the SQL snippet to get the length of a text field.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getSqrtExpression ($column) : string

Returns the SQL snippet to get the squared value of a column.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getRoundExpression ($column, $decimals = 0) : string

Returns the SQL snippet to round a numeric field to the number of decimals specified.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getModExpression ($expression1, $expression2) : string

Returns the SQL snippet to get the remainder of the division operation $expression1 / $expression2.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getRtrimExpression ($str) : string

Returns the SQL snippet to trim trailing space characters from the expression.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getLtrimExpression ($str) : string

Returns the SQL snippet to trim leading space characters from the expression.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getUpperExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to uppercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getLowerExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to lowercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getNowExpression () : string

Returns the SQL snippet to get the current system date.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getNotExpression ($expression) : string

Returns the SQL for a logical not.

Example:

$q = new Doctrine_Query();
$e = $q->expr;
$q->select('*')->from('table')
->where($e->eq('id', $e->not('null'));

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getIsNullExpression ($expression) : string

Returns the SQL that checks if an expression is null.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getIsNotNullExpression ($expression) : string

Returns the SQL that checks if an expression is not null.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getBetweenExpression ($expression, $value1, $value2) : string

Returns the SQL that checks if an expression evaluates to a value between two values.

The parameter $expression is checked if it is between $value1 and $value2.

Note: There is a slight difference in the way BETWEEN works on some databases.
http://www.w3schools.com/sql/sql_between.asp. If you want complete database
independence you should avoid using between().

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getAcosExpression ($value) : string

Returns the SQL to get the arccosine of a value.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getSinExpression ($value) : string

Returns the SQL to get the sine of a value.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getPiExpression () : string

Returns the SQL to get the PI value.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getCosExpression ($value) : string

Returns the SQL to get the cosine of a value.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDateAddSecondsExpression ($date, $seconds) : string

Returns the SQL to add the number of given seconds to a date.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDateSubSecondsExpression ($date, $seconds) : string

Returns the SQL to subtract the number of given seconds from a date.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDateAddMinutesExpression ($date, $minutes) : string

Returns the SQL to add the number of given minutes to a date.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDateSubMinutesExpression ($date, $minutes) : string

Returns the SQL to subtract the number of given minutes from a date.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDateAddHourExpression ($date, $hours) : string

Returns the SQL to add the number of given hours to a date.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDateSubHourExpression ($date, $hours) : string

Returns the SQL to subtract the number of given hours to a date.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDateAddDaysExpression ($date, $days) : string

Returns the SQL to add the number of given days to a date.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDateSubDaysExpression ($date, $days) : string

Returns the SQL to subtract the number of given days to a date.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDateAddWeeksExpression ($date, $weeks) : string

Returns the SQL to add the number of given weeks to a date.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDateSubWeeksExpression ($date, $weeks) : string

Returns the SQL to subtract the number of given weeks from a date.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDateAddMonthExpression ($date, $months) : string

Returns the SQL to add the number of given months to a date.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDateSubMonthExpression ($date, $months) : string

Returns the SQL to subtract the number of given months to a date.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDateAddQuartersExpression ($date, $quarters) : string

Returns the SQL to add the number of given quarters to a date.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDateSubQuartersExpression ($date, $quarters) : string

Returns the SQL to subtract the number of given quarters from a date.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDateAddYearsExpression ($date, $years) : string

Returns the SQL to add the number of given years to a date.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDateSubYearsExpression ($date, $years) : string

Returns the SQL to subtract the number of given years from a date.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getBitAndComparisonExpression ($value1, $value2) : string

Returns the SQL bit AND comparison expression.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getBitOrComparisonExpression ($value1, $value2) : string

Returns the SQL bit OR comparison expression.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getReadLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which locks rows in shared read lock.

This defaults to the ANSI SQL "FOR UPDATE", which is an exclusive lock (Write). Some database
vendors allow to lighten this constraint up to be a real read lock.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getWriteLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which obtains an exclusive lock on the rows.

The semantics of this lock mode should equal the SELECT .. FOR UPDATE of the ANSI SQL standard.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDropTableSQL ($table) : string

Returns the SQL snippet to drop an existing table.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDropTemporaryTableSQL ($table) : string

Returns the SQL to safely drop a temporary table WITHOUT implicitly committing an open transaction.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDropConstraintSQL ($constraint, $table) : string

Returns the SQL to drop a constraint.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDropForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to drop a foreign key.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getCreateTableSQL ($table, $createFlags = self::CREATE_INDEXES) : string[]

Returns the SQL statement(s) to create a table with the specified name, columns and constraints
on this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getCommentOnTableSQL ($tableName, $comment) : string

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getInlineColumnCommentSQL ($comment) : string

Returns the SQL to create inline comment on a column.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getPartialIndexSQL ($index) : string

Adds condition for partial index.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getCreateSchemaSQL ($schemaName) : string

Returns the SQL to create a named schema.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::quoteIdentifier ($str) : string

Quotes a string so that it can be safely used as a table or column name,
even if it is a reserved word of the platform. This also detects identifier
chains separated by dot and quotes them independently.

NOTE: Just because you CAN use quoted identifiers doesn't mean
you SHOULD use them. In general, they end up causing way more
problems than they solve.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::quoteSingleIdentifier ($str) : string

Quotes a single identifier (no dot chain separation).

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getCreateForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to create a new foreign key.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::onSchemaAlterTableAddColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::onSchemaAlterTableRemoveColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::onSchemaAlterTableChangeColumn ($columnDiff, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::onSchemaAlterTableRenameColumn ($oldColumnName, $column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::onSchemaAlterTable ($diff, &$sql) : bool

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getPreAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getPostAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::_getAlterTableIndexForeignKeySQL ($diff) : string[]

Common code for alter table statement generation that updates the changed Index and Foreign Key definitions.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getColumnDeclarationListSQL ($fields) : string

Gets declaration of a number of fields in bulk.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getColumnDeclarationSQL ($name, $field) : string

Obtains DBMS specific SQL code portion needed to declare a generic type
field to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDecimalTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a floating point column of arbitrary precision.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDefaultValueDeclarationSQL ($field) : string

Obtains DBMS specific SQL code portion needed to set a default value
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getCheckDeclarationSQL ($definition) : string

Obtains DBMS specific SQL code portion needed to set a CHECK constraint
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getCustomTypeDeclarationSQL ($columnDef) : string

Obtains SQL code portion needed to create a custom column,
e.g. when a field has the "columnDefinition" keyword.
Only "AUTOINCREMENT" and "PRIMARY KEY" are added if appropriate.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getIndexFieldDeclarationListSQL ($columnsOrIndex) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getTemporaryTableName ($tableName) : string

Some vendors require temporary table names to be qualified specially.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getForeignKeyDeclarationSQL ($foreignKey) : string

Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getUniqueFieldDeclarationSQL () : string

Obtains DBMS specific SQL code portion needed to set the UNIQUE constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getColumnCharsetDeclarationSQL ($charset) : string

Obtains DBMS specific SQL code portion needed to set the CHARACTER SET
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getColumnCollationDeclarationSQL ($collation) : string

Obtains DBMS specific SQL code portion needed to set the COLLATION
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::prefersSequences () : bool

Whether the platform prefers sequences for ID generation.
Subclasses should override this method to return TRUE if they prefer sequences.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::convertBooleans ($item) : mixed

Some platforms need the boolean values to be converted.

The default conversion in this implementation converts to integers (false => 0, true => 1).

Note: if the input is not a boolean the original input might be returned.

There are two contexts when converting booleans: Literals and Prepared Statements.
This method should handle the literal case

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::convertFromBoolean ($item) : boolnull

Some platforms have boolean literals that needs to be correctly converted

The default conversion tries to convert value into bool "(bool)$item"

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::convertBooleansToDatabaseValue ($item) : mixed

This method should handle the prepared statements case. When there is no
distinction, it's OK to use the same method.

Note: if the input is not a boolean the original input might be returned.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getListNamespacesSQL () : string

Returns the SQL statement for retrieving the namespaces defined in the database.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getFloatDeclarationSQL ($fieldDeclaration) : string

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::usesSequenceEmulatedIdentityColumns () : bool

Whether the platform emulates identity columns through sequences.

Some platforms that do not support identity columns natively
but support sequences can emulate identity columns by using
sequences.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getIdentitySequenceName ($tableName, $columnName) : string

Returns the name of the sequence for a particular identity column in a particular table.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::supportsIndexes () : bool

Whether the platform supports indexes.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::supportsPartialIndexes () : bool

Whether the platform supports partial indexes.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::supportsColumnLengthIndexes () : bool

Whether the platform supports indexes with column length definitions.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::supportsAlterTable () : bool

Whether the platform supports altering tables.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::supportsTransactions () : bool

Whether the platform supports transactions.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::supportsSavepoints () : bool

Whether the platform supports savepoints.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::supportsReleaseSavepoints () : bool

Whether the platform supports releasing savepoints.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::supportsPrimaryConstraints () : bool

Whether the platform supports primary key constraints.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::supportsForeignKeyConstraints () : bool

Whether the platform supports foreign key constraints.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::supportsForeignKeyOnUpdate () : bool

Whether this platform supports onUpdate in foreign key constraints.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::supportsSchemas () : bool

Whether the platform supports database schemas.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::canEmulateSchemas () : bool

Whether this platform can emulate schemas.

Platforms that either support or emulate schemas don't automatically
filter a schema for the namespaced elements in {@link
AbstractManager#createSchema}.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDefaultSchemaName () : string

Returns the default schema name.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::supportsCreateDropDatabase () : bool

Whether this platform supports create database.

Some databases don't allow to create and drop databases at all or only with certain tools.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::supportsGettingAffectedRows () : bool

Whether the platform supports getting the affected rows of a recent update/delete type query.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::supportsInlineColumnComments () : bool

Whether this platform support to add inline column comments as postfix.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::hasNativeJsonType () : bool

Does this platform have native JSON type.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getIdentityColumnNullInsertSQL () : void

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::supportsViews () : bool

Whether this platform supports views.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::supportsColumnCollation () : bool

Does this platform support column collation?

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDateFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored date value of this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::modifyLimitQuery ($query, $limit, $offset = null) : string

Adds an driver-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::supportsLimitOffset () : bool

Whether the database platform support offsets in modify limit clauses.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getSQLResultCasing ($column) : string

Gets the character casing of a column in an SQL result set of this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getEmptyIdentityInsertSQL ($tableName, $identifierColumnName) : string

Returns the insert SQL for an empty insert statement.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getDummySelectSQL () : string

This is for test reasons, many vendors have special requirements for dummy statements.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::createSavePoint ($savepoint) : string

Returns the SQL to create a new savepoint.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::releaseSavePoint ($savepoint) : string

Returns the SQL to release a savepoint.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::rollbackSavePoint ($savepoint) : string

Returns the SQL to rollback a savepoint.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getReservedKeywordsList () : Doctrine\DBAL\Platforms\Keywords\KeywordList

Returns the keyword list instance of this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::quoteStringLiteral ($str) : string

Quotes a literal string.
This method is NOT meant to fix SQL injections!
It is only meant to escape this platform's string literal
quote character inside the given literal string.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getStringLiteralQuoteCharacter () : string

Gets the character used for string literal quoting.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::escapeStringForLike ($inputString, $escapeChar) : string

Escapes metacharacters in a string intended to be used with a LIKE
operator.

method Doctrine\DBAL\Platforms\SQLAnywhere12Platform::getLikeWildcardCharacters () : string

class Doctrine\DBAL\Platforms::SQLAnywhere16Platform

The SQLAnywhere16Platform provides the behavior, features and SQL dialect of the
SAP Sybase SQL Anywhere 16 database platform.

classconstant integer Doctrine\DBAL\Platforms\SQLAnywhere16Platform::FOREIGN_KEY_MATCH_SIMPLE

classconstant integer Doctrine\DBAL\Platforms\SQLAnywhere16Platform::FOREIGN_KEY_MATCH_FULL

classconstant integer Doctrine\DBAL\Platforms\SQLAnywhere16Platform::FOREIGN_KEY_MATCH_SIMPLE_UNIQUE

classconstant integer Doctrine\DBAL\Platforms\SQLAnywhere16Platform::FOREIGN_KEY_MATCH_FULL_UNIQUE

classconstant integer Doctrine\DBAL\Platforms\SQLAnywhere16Platform::CREATE_INDEXES

classconstant integer Doctrine\DBAL\Platforms\SQLAnywhere16Platform::CREATE_FOREIGNKEYS

classconstant string Doctrine\DBAL\Platforms\SQLAnywhere16Platform::DATE_INTERVAL_UNIT_SECOND

classconstant string Doctrine\DBAL\Platforms\SQLAnywhere16Platform::DATE_INTERVAL_UNIT_MINUTE

classconstant string Doctrine\DBAL\Platforms\SQLAnywhere16Platform::DATE_INTERVAL_UNIT_HOUR

classconstant string Doctrine\DBAL\Platforms\SQLAnywhere16Platform::DATE_INTERVAL_UNIT_DAY

classconstant string Doctrine\DBAL\Platforms\SQLAnywhere16Platform::DATE_INTERVAL_UNIT_WEEK

classconstant string Doctrine\DBAL\Platforms\SQLAnywhere16Platform::DATE_INTERVAL_UNIT_MONTH

classconstant string Doctrine\DBAL\Platforms\SQLAnywhere16Platform::DATE_INTERVAL_UNIT_QUARTER

classconstant string Doctrine\DBAL\Platforms\SQLAnywhere16Platform::DATE_INTERVAL_UNIT_YEAR

classconstant integer Doctrine\DBAL\Platforms\SQLAnywhere16Platform::TRIM_UNSPECIFIED

classconstant integer Doctrine\DBAL\Platforms\SQLAnywhere16Platform::TRIM_LEADING

classconstant integer Doctrine\DBAL\Platforms\SQLAnywhere16Platform::TRIM_TRAILING

classconstant integer Doctrine\DBAL\Platforms\SQLAnywhere16Platform::TRIM_BOTH

property string[]null Doctrine\DBAL\Platforms\SQLAnywhere16Platform::doctrineTypeMapping

property string[]null Doctrine\DBAL\Platforms\SQLAnywhere16Platform::doctrineTypeComments

Contains a list of all columns that should generate parseable column comments for type-detection
in reverse engineering scenarios.

property Doctrine\Common\EventManager Doctrine\DBAL\Platforms\SQLAnywhere16Platform::_eventManager

property Doctrine\DBAL\Platforms\Keywords\KeywordListnull Doctrine\DBAL\Platforms\SQLAnywhere16Platform::_keywords

Holds the KeywordList instance for the current platform.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getAdvancedIndexOptionsSQL ($index) : string

Return the INDEX query section dealing with non-standard
SQL Anywhere options.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getReservedKeywordsClass () : string

Returns the class name of the reserved keywords list.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getCreateSequenceSQL ($sequence) : string

Returns the SQL to create a sequence on this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getAlterSequenceSQL ($sequence) : string

Returns the SQL to change a sequence on this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDateTimeTzFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime with timezone value of this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDateTimeTzTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime with timezone offset fields.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDropSequenceSQL ($sequence) : string

Returns the SQL snippet to drop an existing sequence.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getListSequencesSQL ($database) : string

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getSequenceNextValSQL ($sequenceName) : string

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::supportsSequences () : bool

Whether the platform supports sequences.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::initializeDoctrineTypeMappings () : void

Lazy load Doctrine Type Mappings.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getRegexpExpression () : string

Returns the regular expression operator.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::appendLockHint ($fromClause, $lockMode) : string

Honors that some SQL vendors such as MsSql use table hints for locking instead of the ANSI SQL FOR UPDATE specification.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::fixSchemaElementName ($schemaElementName) : string

Makes any fixes to a name of a schema element (table, sequence, ...) that are required
by restrictions of the platform, like a maximum length.

SQL Anywhere supports a maximum length of 128 bytes for identifiers.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getAdvancedForeignKeyOptionsSQL ($foreignKey) : string

Returns the FOREIGN KEY query section dealing with non-standard options
as MATCH, INITIALLY DEFERRED, ON UPDATE, ...

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getAlterTableSQL ($diff) : string[]

Gets the SQL statements for altering an existing table.

This method returns an array of SQL statements, since some platforms need several statements.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getAlterTableAddColumnClause ($column) : string

Returns the SQL clause for creating a column in a table alteration.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getAlterTableClause ($tableName) : string

Returns the SQL clause for altering a table.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getAlterTableRemoveColumnClause ($column) : string

Returns the SQL clause for dropping a column in a table alteration.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getAlterTableRenameColumnClause ($oldColumnName, $column) : string

Returns the SQL clause for renaming a column in a table alteration.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getAlterTableRenameTableClause ($newTableName) : string

Returns the SQL clause for renaming a table in a table alteration.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getAlterTableChangeColumnClause ($columnDiff) : stringnull

Returns the SQL clause for altering a column in a table alteration.

This method returns null in case that only the column comment has changed.
Changes in column comments have to be handled differently.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getBigIntTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares an 8 byte integer column.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getBinaryDefaultLength () : int

Gets the default length of a binary field.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getBinaryMaxLength () : int

Gets the maximum length of a binary field.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getBlobTypeDeclarationSQL ($field) : string

Returns the SQL Snippet used to declare a BLOB column type.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getBooleanTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a boolean column.

BIT type columns require an explicit NULL declaration
in SQL Anywhere if they shall be nullable.
Otherwise by just omitting the NOT NULL clause,
SQL Anywhere will declare them NOT NULL nonetheless.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getClobTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a CLOB column type.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getCommentOnColumnSQL ($tableName, $columnName, $comment) : string

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getConcatExpression () : string

Returns a SQL snippet to concatenate the given expressions.

Accepts an arbitrary number of string parameters. Each parameter must contain an expression.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getCreateConstraintSQL ($constraint, $table) : string

Returns the SQL to create a constraint on a table on this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getCreateDatabaseSQL ($database) : string

Returns the SQL to create a new database.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getCreateIndexSQL ($index, $table) : string

Returns the SQL to create an index on a table on this platform.

Appends SQL Anywhere specific flags if given.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getCreatePrimaryKeySQL ($index, $table) : string

Returns the SQL to create an unnamed primary key constraint.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getCreateTemporaryTableSnippetSQL () : string

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getCreateViewSQL ($name, $sql) : string

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getCurrentDateSQL () : string

Returns the SQL specific for the platform to get the current date.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getCurrentTimeSQL () : string

Returns the SQL specific for the platform to get the current time.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getCurrentTimestampSQL () : string

Returns the SQL specific for the platform to get the current timestamp

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDateArithmeticIntervalExpression ($date, $operator, $interval, $unit) : string

Returns the SQL for a date arithmetic expression.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDateDiffExpression ($date1, $date2) : string

Returns the SQL to calculate the difference in days between the two passed dates.

Computes diff = date1 - date2.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDateTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored datetime value of this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDateTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create datetime fields in
statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDateTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create date fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDefaultTransactionIsolationLevel () : int

Gets the default transaction isolation level of the platform.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDropDatabaseSQL ($database) : string

Returns the SQL snippet to drop an existing database.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDropIndexSQL ($index, $table = null) : string

Returns the SQL to drop an index from a table.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDropViewSQL ($name) : string

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getForeignKeyBaseDeclarationSQL ($foreignKey) : string

Obtains DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getForeignKeyMatchClauseSQL ($type) : string

Returns foreign key MATCH clause for given type.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getForeignKeyReferentialActionSQL ($action) : string

Returns the given referential action in uppercase if valid, otherwise throws an exception.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getForUpdateSQL () : string

Returns the FOR UPDATE expression.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getGuidExpression () : string

Returns the global unique identifier expression.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getGuidTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a GUID/UUID field.

By default this maps directly to a CHAR(36) and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getIndexDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getIntegerTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a 4 byte integer column.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getListDatabasesSQL () : string

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getListTableColumnsSQL ($table, $database = null) : string

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getListTableConstraintsSQL ($table) : string

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getListTableForeignKeysSQL ($table) : string

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getListTableIndexesSQL ($table, $currentDatabase = null) : string

Returns the list of indexes for the current database.

The current database parameter is optional but will always be passed
when using the SchemaManager API and is the database the given table is in.

Attention: Some platforms only support currentDatabase when they
are connected with that database. Cross-database information schema
requests may be impossible.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getListTablesSQL () : string

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getListUsersSQL () : string

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getListViewsSQL ($database) : string

Returns the SQL to list all views of a database or user.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getLocateExpression ($str, $substr, $startPos = false) : string

Returns the SQL snippet to get the position of the first occurrence of substring $substr in string $str.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getMaxIdentifierLength () : int

Maximum length of any given database identifier, like tables or column names.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getMd5Expression ($column) : string

Returns the SQL snippet to get the md5 sum of a field.

Note: Not SQL92, but common functionality.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getName () : string

Gets the name of the platform.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getPrimaryKeyDeclarationSQL ($index, $name = null) : string

Obtain DBMS specific SQL code portion needed to set a primary key
declaration to be used in statements like ALTER TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getSetTransactionIsolationSQL ($level) : string

Returns the SQL to set the transaction isolation level.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getSmallIntTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a 2 byte integer column.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getStartDatabaseSQL ($database) : string

Returns the SQL statement for starting an existing database.

In SQL Anywhere you can start and stop databases on a
database server instance.
This is a required statement after having created a new database
as it has to be explicitly started to be usable.
SQL Anywhere does not automatically start a database after creation!

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getStopDatabaseSQL ($database) : string

Returns the SQL statement for stopping a running database.

In SQL Anywhere you can start and stop databases on a
database server instance.
This is a required statement before dropping an existing database
as it has to be explicitly stopped before it can be dropped.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getSubstringExpression ($value, $from, $length = null) : string

Returns a SQL snippet to get a substring inside an SQL statement.

Note: Not SQL92, but common functionality.

SQLite only supports the 2 parameter variant of this function.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getTemporaryTableSQL () : string

Returns the required SQL string that fits between CREATE ... TABLE
to create the table as a temporary table.

Should be overridden in driver classes to return the correct string for the
specific database type.

The default is to return the string "TEMPORARY" - this will result in a
SQL error for any database that does not support temporary tables, or that
requires a different SQL command from "CREATE TEMPORARY TABLE".

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getTimeFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored time value of this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getTimeTypeDeclarationSQL ($fieldDeclaration) : string

Obtains DBMS specific SQL to be used to create time fields in statements
like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getTrimExpression ($str, $pos = Doctrine\DBAL\Platforms\TrimMode::UNSPECIFIED, $char = false) : string

Returns the SQL snippet to trim a string.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getTruncateTableSQL ($tableName, $cascade = false) : string

Generates a Truncate Table SQL statement for a given table.

Cascade is not supported on many platforms but would optionally cascade the truncate by
following the foreign keys.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getUniqueConstraintDeclarationSQL ($name, $index) : string

Obtains DBMS specific SQL code portion needed to set a unique
constraint declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getVarcharDefaultLength () : int

Gets the default length of a varchar field.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getVarcharMaxLength () : int

Gets the maximum length of a varchar field.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::hasNativeGuidType () : bool

Does this platform have native guid type.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::prefersIdentityColumns () : bool

Whether the platform prefers identity columns (eg. autoincrement) for ID generation.
Subclasses should override this method to return TRUE if they prefer identity columns.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::supportsCommentOnStatement () : bool

Whether this platform support the proprietary syntax "COMMENT ON asset".

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::supportsIdentityColumns () : bool

Whether the platform supports identity columns.

Identity columns are columns that receive an auto-generated value from the
database on insert of a row.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::_getCommonIntegerTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares common properties of an integer column.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::_getCreateTableSQL ($tableName, $columns, $options = []) : string[]

Returns the SQL used to create a table.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::_getTransactionIsolationLevelSQL ($level) : string

Returns the SQL for a given transaction isolation level Connection constant.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::doModifyLimitQuery ($query, $limit, $offset) : string

Adds an platform-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getBinaryTypeDeclarationSQLSnippet ($length, $fixed) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getTableConstraintDeclarationSQL ($constraint, $name = null) : string

Returns the SQL snippet for creating a table constraint.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getCreateIndexSQLFlags ($index) : string

Adds additional flags for index generation.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getRenameIndexSQL ($oldIndexName, $index, $tableName) : string[]

Returns the SQL for renaming an index on a table.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getVarcharTypeDeclarationSQLSnippet ($length, $fixed) : string

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::__construct () : void

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::setEventManager ($eventManager) : void

Sets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getEventManager () : Doctrine\Common\EventManager

Gets the EventManager used by the Platform.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getVarcharTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a VARCHAR column type.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getBinaryTypeDeclarationSQL ($field) : string

Returns the SQL snippet used to declare a BINARY/VARBINARY column type.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getJsonTypeDeclarationSQL ($field) : string

Returns the SQL snippet to declare a JSON field.

By default this maps directly to a CLOB and only maps to more
special datatypes when the underlying databases support this datatype.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::registerDoctrineTypeMapping ($dbType, $doctrineType) : void

Registers a doctrine type to be used in conjunction with a column type of this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDoctrineTypeMapping ($dbType) : string

Gets the Doctrine type that is mapped for the given database column type.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::hasDoctrineTypeMappingFor ($dbType) : bool

Checks if a database type is currently supported by this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::initializeCommentedDoctrineTypes () : void

Initializes the Doctrine Type comments instance variable for in_array() checks.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::isCommentedDoctrineType ($doctrineType) : bool

Is it necessary for the platform to add a parsable type comment to allow reverse engineering the given type?

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::markDoctrineTypeCommented ($doctrineType) : void

Marks this type as to be commented in ALTER TABLE and CREATE TABLE statements.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDoctrineTypeComment ($doctrineType) : string

Gets the comment to append to a column comment that helps parsing this type in reverse engineering.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getColumnComment ($column) : stringnull

Gets the comment of a passed column modified by potential doctrine type comment hints.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getIdentifierQuoteCharacter () : string

Gets the character used for identifier quoting.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getSqlCommentStartString () : string

Gets the string portion that starts an SQL comment.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getSqlCommentEndString () : string

Gets the string portion that ends an SQL comment.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getCharMaxLength () : int

Gets the maximum length of a char field.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getWildcards () : string[]

Gets all SQL wildcard characters of the platform.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getAvgExpression ($column) : string

Returns the SQL snippet to get the average value of a column.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getCountExpression ($column) : string

Returns the SQL snippet to get the number of rows (without a NULL value) of a column.

If a '*' is used instead of a column the number of selected rows is returned.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getMaxExpression ($column) : string

Returns the SQL snippet to get the highest value of a column.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getMinExpression ($column) : string

Returns the SQL snippet to get the lowest value of a column.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getSumExpression ($column) : string

Returns the SQL snippet to get the total sum of a column.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getLengthExpression ($column) : string

Returns the SQL snippet to get the length of a text field.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getSqrtExpression ($column) : string

Returns the SQL snippet to get the squared value of a column.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getRoundExpression ($column, $decimals = 0) : string

Returns the SQL snippet to round a numeric field to the number of decimals specified.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getModExpression ($expression1, $expression2) : string

Returns the SQL snippet to get the remainder of the division operation $expression1 / $expression2.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getRtrimExpression ($str) : string

Returns the SQL snippet to trim trailing space characters from the expression.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getLtrimExpression ($str) : string

Returns the SQL snippet to trim leading space characters from the expression.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getUpperExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to uppercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getLowerExpression ($str) : string

Returns the SQL snippet to change all characters from the expression to lowercase,
according to the current character set mapping.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getNowExpression () : string

Returns the SQL snippet to get the current system date.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getNotExpression ($expression) : string

Returns the SQL for a logical not.

Example:

$q = new Doctrine_Query();
$e = $q->expr;
$q->select('*')->from('table')
->where($e->eq('id', $e->not('null'));

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getIsNullExpression ($expression) : string

Returns the SQL that checks if an expression is null.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getIsNotNullExpression ($expression) : string

Returns the SQL that checks if an expression is not null.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getBetweenExpression ($expression, $value1, $value2) : string

Returns the SQL that checks if an expression evaluates to a value between two values.

The parameter $expression is checked if it is between $value1 and $value2.

Note: There is a slight difference in the way BETWEEN works on some databases.
http://www.w3schools.com/sql/sql_between.asp. If you want complete database
independence you should avoid using between().

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getAcosExpression ($value) : string

Returns the SQL to get the arccosine of a value.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getSinExpression ($value) : string

Returns the SQL to get the sine of a value.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getPiExpression () : string

Returns the SQL to get the PI value.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getCosExpression ($value) : string

Returns the SQL to get the cosine of a value.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDateAddSecondsExpression ($date, $seconds) : string

Returns the SQL to add the number of given seconds to a date.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDateSubSecondsExpression ($date, $seconds) : string

Returns the SQL to subtract the number of given seconds from a date.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDateAddMinutesExpression ($date, $minutes) : string

Returns the SQL to add the number of given minutes to a date.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDateSubMinutesExpression ($date, $minutes) : string

Returns the SQL to subtract the number of given minutes from a date.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDateAddHourExpression ($date, $hours) : string

Returns the SQL to add the number of given hours to a date.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDateSubHourExpression ($date, $hours) : string

Returns the SQL to subtract the number of given hours to a date.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDateAddDaysExpression ($date, $days) : string

Returns the SQL to add the number of given days to a date.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDateSubDaysExpression ($date, $days) : string

Returns the SQL to subtract the number of given days to a date.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDateAddWeeksExpression ($date, $weeks) : string

Returns the SQL to add the number of given weeks to a date.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDateSubWeeksExpression ($date, $weeks) : string

Returns the SQL to subtract the number of given weeks from a date.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDateAddMonthExpression ($date, $months) : string

Returns the SQL to add the number of given months to a date.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDateSubMonthExpression ($date, $months) : string

Returns the SQL to subtract the number of given months to a date.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDateAddQuartersExpression ($date, $quarters) : string

Returns the SQL to add the number of given quarters to a date.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDateSubQuartersExpression ($date, $quarters) : string

Returns the SQL to subtract the number of given quarters from a date.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDateAddYearsExpression ($date, $years) : string

Returns the SQL to add the number of given years to a date.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDateSubYearsExpression ($date, $years) : string

Returns the SQL to subtract the number of given years from a date.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getBitAndComparisonExpression ($value1, $value2) : string

Returns the SQL bit AND comparison expression.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getBitOrComparisonExpression ($value1, $value2) : string

Returns the SQL bit OR comparison expression.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getReadLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which locks rows in shared read lock.

This defaults to the ANSI SQL "FOR UPDATE", which is an exclusive lock (Write). Some database
vendors allow to lighten this constraint up to be a real read lock.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getWriteLockSQL () : string

Returns the SQL snippet to append to any SELECT statement which obtains an exclusive lock on the rows.

The semantics of this lock mode should equal the SELECT .. FOR UPDATE of the ANSI SQL standard.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDropTableSQL ($table) : string

Returns the SQL snippet to drop an existing table.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDropTemporaryTableSQL ($table) : string

Returns the SQL to safely drop a temporary table WITHOUT implicitly committing an open transaction.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDropConstraintSQL ($constraint, $table) : string

Returns the SQL to drop a constraint.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDropForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to drop a foreign key.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getCreateTableSQL ($table, $createFlags = self::CREATE_INDEXES) : string[]

Returns the SQL statement(s) to create a table with the specified name, columns and constraints
on this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getCommentOnTableSQL ($tableName, $comment) : string

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getInlineColumnCommentSQL ($comment) : string

Returns the SQL to create inline comment on a column.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getPartialIndexSQL ($index) : string

Adds condition for partial index.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getCreateSchemaSQL ($schemaName) : string

Returns the SQL to create a named schema.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::quoteIdentifier ($str) : string

Quotes a string so that it can be safely used as a table or column name,
even if it is a reserved word of the platform. This also detects identifier
chains separated by dot and quotes them independently.

NOTE: Just because you CAN use quoted identifiers doesn't mean
you SHOULD use them. In general, they end up causing way more
problems than they solve.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::quoteSingleIdentifier ($str) : string

Quotes a single identifier (no dot chain separation).

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getCreateForeignKeySQL ($foreignKey, $table) : string

Returns the SQL to create a new foreign key.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::onSchemaAlterTableAddColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::onSchemaAlterTableRemoveColumn ($column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::onSchemaAlterTableChangeColumn ($columnDiff, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::onSchemaAlterTableRenameColumn ($oldColumnName, $column, $diff, &$columnSql) : bool

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::onSchemaAlterTable ($diff, &$sql) : bool

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getPreAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getPostAlterTableIndexForeignKeySQL ($diff) : string[]

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::_getAlterTableIndexForeignKeySQL ($diff) : string[]

Common code for alter table statement generation that updates the changed Index and Foreign Key definitions.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getColumnDeclarationListSQL ($fields) : string

Gets declaration of a number of fields in bulk.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getColumnDeclarationSQL ($name, $field) : string

Obtains DBMS specific SQL code portion needed to declare a generic type
field to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDecimalTypeDeclarationSQL ($columnDef) : string

Returns the SQL snippet that declares a floating point column of arbitrary precision.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDefaultValueDeclarationSQL ($field) : string

Obtains DBMS specific SQL code portion needed to set a default value
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getCheckDeclarationSQL ($definition) : string

Obtains DBMS specific SQL code portion needed to set a CHECK constraint
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getCustomTypeDeclarationSQL ($columnDef) : string

Obtains SQL code portion needed to create a custom column,
e.g. when a field has the "columnDefinition" keyword.
Only "AUTOINCREMENT" and "PRIMARY KEY" are added if appropriate.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getIndexFieldDeclarationListSQL ($columnsOrIndex) : string

Obtains DBMS specific SQL code portion needed to set an index
declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getTemporaryTableName ($tableName) : string

Some vendors require temporary table names to be qualified specially.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getForeignKeyDeclarationSQL ($foreignKey) : string

Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getUniqueFieldDeclarationSQL () : string

Obtains DBMS specific SQL code portion needed to set the UNIQUE constraint
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getColumnCharsetDeclarationSQL ($charset) : string

Obtains DBMS specific SQL code portion needed to set the CHARACTER SET
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getColumnCollationDeclarationSQL ($collation) : string

Obtains DBMS specific SQL code portion needed to set the COLLATION
of a field declaration to be used in statements like CREATE TABLE.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::prefersSequences () : bool

Whether the platform prefers sequences for ID generation.
Subclasses should override this method to return TRUE if they prefer sequences.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::convertBooleans ($item) : mixed

Some platforms need the boolean values to be converted.

The default conversion in this implementation converts to integers (false => 0, true => 1).

Note: if the input is not a boolean the original input might be returned.

There are two contexts when converting booleans: Literals and Prepared Statements.
This method should handle the literal case

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::convertFromBoolean ($item) : boolnull

Some platforms have boolean literals that needs to be correctly converted

The default conversion tries to convert value into bool "(bool)$item"

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::convertBooleansToDatabaseValue ($item) : mixed

This method should handle the prepared statements case. When there is no
distinction, it's OK to use the same method.

Note: if the input is not a boolean the original input might be returned.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getListNamespacesSQL () : string

Returns the SQL statement for retrieving the namespaces defined in the database.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getFloatDeclarationSQL ($fieldDeclaration) : string

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::usesSequenceEmulatedIdentityColumns () : bool

Whether the platform emulates identity columns through sequences.

Some platforms that do not support identity columns natively
but support sequences can emulate identity columns by using
sequences.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getIdentitySequenceName ($tableName, $columnName) : string

Returns the name of the sequence for a particular identity column in a particular table.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::supportsIndexes () : bool

Whether the platform supports indexes.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::supportsPartialIndexes () : bool

Whether the platform supports partial indexes.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::supportsColumnLengthIndexes () : bool

Whether the platform supports indexes with column length definitions.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::supportsAlterTable () : bool

Whether the platform supports altering tables.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::supportsTransactions () : bool

Whether the platform supports transactions.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::supportsSavepoints () : bool

Whether the platform supports savepoints.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::supportsReleaseSavepoints () : bool

Whether the platform supports releasing savepoints.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::supportsPrimaryConstraints () : bool

Whether the platform supports primary key constraints.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::supportsForeignKeyConstraints () : bool

Whether the platform supports foreign key constraints.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::supportsForeignKeyOnUpdate () : bool

Whether this platform supports onUpdate in foreign key constraints.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::supportsSchemas () : bool

Whether the platform supports database schemas.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::canEmulateSchemas () : bool

Whether this platform can emulate schemas.

Platforms that either support or emulate schemas don't automatically
filter a schema for the namespaced elements in {@link
AbstractManager#createSchema}.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDefaultSchemaName () : string

Returns the default schema name.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::supportsCreateDropDatabase () : bool

Whether this platform supports create database.

Some databases don't allow to create and drop databases at all or only with certain tools.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::supportsGettingAffectedRows () : bool

Whether the platform supports getting the affected rows of a recent update/delete type query.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::supportsInlineColumnComments () : bool

Whether this platform support to add inline column comments as postfix.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::hasNativeJsonType () : bool

Does this platform have native JSON type.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getIdentityColumnNullInsertSQL () : void

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::supportsViews () : bool

Whether this platform supports views.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::supportsColumnCollation () : bool

Does this platform support column collation?

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDateFormatString () : string

Gets the format string, as accepted by the date() function, that describes
the format of a stored date value of this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::modifyLimitQuery ($query, $limit, $offset = null) : string

Adds an driver-specific LIMIT clause to the query.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::supportsLimitOffset () : bool

Whether the database platform support offsets in modify limit clauses.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getSQLResultCasing ($column) : string

Gets the character casing of a column in an SQL result set of this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getEmptyIdentityInsertSQL ($tableName, $identifierColumnName) : string

Returns the insert SQL for an empty insert statement.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getDummySelectSQL () : string

This is for test reasons, many vendors have special requirements for dummy statements.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::createSavePoint ($savepoint) : string

Returns the SQL to create a new savepoint.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::releaseSavePoint ($savepoint) : string

Returns the SQL to release a savepoint.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::rollbackSavePoint ($savepoint) : string

Returns the SQL to rollback a savepoint.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getReservedKeywordsList () : Doctrine\DBAL\Platforms\Keywords\KeywordList

Returns the keyword list instance of this platform.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::quoteStringLiteral ($str) : string

Quotes a literal string.
This method is NOT meant to fix SQL injections!
It is only meant to escape this platform's string literal
quote character inside the given literal string.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getStringLiteralQuoteCharacter () : string

Gets the character used for string literal quoting.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::escapeStringForLike ($inputString, $escapeChar) : string

Escapes metacharacters in a string intended to be used with a LIKE
operator.

method Doctrine\DBAL\Platforms\SQLAnywhere16Platform::getLikeWildcardCharacters () : string

class Doctrine\DBAL\Platforms::DateIntervalUnit

classconstant string Doctrine\DBAL\Platforms\DateIntervalUnit::SECOND

classconstant string Doctrine\DBAL\Platforms\DateIntervalUnit::MINUTE

classconstant string Doctrine\DBAL\Platforms\DateIntervalUnit::HOUR

classconstant string Doctrine\DBAL\Platforms\DateIntervalUnit::DAY

classconstant string Doctrine\DBAL\Platforms\DateIntervalUnit::WEEK

classconstant string Doctrine\DBAL\Platforms\DateIntervalUnit::MONTH

classconstant string Doctrine\DBAL\Platforms\DateIntervalUnit::QUARTER

classconstant string Doctrine\DBAL\Platforms\DateIntervalUnit::YEAR

class Doctrine\DBAL\Platforms::TrimMode

classconstant integer Doctrine\DBAL\Platforms\TrimMode::UNSPECIFIED

classconstant integer Doctrine\DBAL\Platforms\TrimMode::LEADING

classconstant integer Doctrine\DBAL\Platforms\TrimMode::TRAILING

classconstant integer Doctrine\DBAL\Platforms\TrimMode::BOTH

namespace Doctrine\DBAL\Query

namespace Doctrine\DBAL\Query\Expression

class Doctrine\DBAL\Query\Expression::ExpressionBuilder

ExpressionBuilder class is responsible to dynamically create SQL query parts.

classconstant string Doctrine\DBAL\Query\Expression\ExpressionBuilder::EQ

classconstant string Doctrine\DBAL\Query\Expression\ExpressionBuilder::NEQ

classconstant string Doctrine\DBAL\Query\Expression\ExpressionBuilder::LT

classconstant string Doctrine\DBAL\Query\Expression\ExpressionBuilder::LTE

classconstant string Doctrine\DBAL\Query\Expression\ExpressionBuilder::GT

classconstant string Doctrine\DBAL\Query\Expression\ExpressionBuilder::GTE

method Doctrine\DBAL\Query\Expression\ExpressionBuilder::__construct ($connection) : void

Initializes a new ExpressionBuilder.

method Doctrine\DBAL\Query\Expression\ExpressionBuilder::andX ($x = null) : Doctrine\DBAL\Query\Expression\CompositeExpression

Creates a conjunction of the given boolean expressions.

Example:

[php]
// (u.type = ?) AND (u.role = ?)
$expr->andX('u.type = ?', 'u.role = ?'));

method Doctrine\DBAL\Query\Expression\ExpressionBuilder::orX ($x = null) : Doctrine\DBAL\Query\Expression\CompositeExpression

Creates a disjunction of the given boolean expressions.

Example:

[php]
// (u.type = ?) OR (u.role = ?)
$qb->where($qb->expr()->orX('u.type = ?', 'u.role = ?'));

method Doctrine\DBAL\Query\Expression\ExpressionBuilder::comparison ($x, $operator, $y) : string

Creates a comparison expression.

method Doctrine\DBAL\Query\Expression\ExpressionBuilder::eq ($x, $y) : string

Creates an equality comparison expression with the given arguments.

First argument is considered the left expression and the second is the right expression.
When converted to string, it will generated a = . Example:

[php]
// u.id = ?
$expr->eq('u.id', '?');

method Doctrine\DBAL\Query\Expression\ExpressionBuilder::neq ($x, $y) : string

Creates a non equality comparison expression with the given arguments.
First argument is considered the left expression and the second is the right expression.
When converted to string, it will generated a <> . Example:

[php]
// u.id <> 1
$q->where($q->expr()->neq('u.id', '1'));

method Doctrine\DBAL\Query\Expression\ExpressionBuilder::lt ($x, $y) : string

Creates a lower-than comparison expression with the given arguments.
First argument is considered the left expression and the second is the right expression.
When converted to string, it will generated a < . Example:

[php]
// u.id < ?
$q->where($q->expr()->lt('u.id', '?'));

method Doctrine\DBAL\Query\Expression\ExpressionBuilder::lte ($x, $y) : string

Creates a lower-than-equal comparison expression with the given arguments.
First argument is considered the left expression and the second is the right expression.
When converted to string, it will generated a <= . Example:

[php]
// u.id <= ?
$q->where($q->expr()->lte('u.id', '?'));

method Doctrine\DBAL\Query\Expression\ExpressionBuilder::gt ($x, $y) : string

Creates a greater-than comparison expression with the given arguments.
First argument is considered the left expression and the second is the right expression.
When converted to string, it will generated a > . Example:

[php]
// u.id > ?
$q->where($q->expr()->gt('u.id', '?'));

method Doctrine\DBAL\Query\Expression\ExpressionBuilder::gte ($x, $y) : string

Creates a greater-than-equal comparison expression with the given arguments.
First argument is considered the left expression and the second is the right expression.
When converted to string, it will generated a >= . Example:

[php]
// u.id >= ?
$q->where($q->expr()->gte('u.id', '?'));

method Doctrine\DBAL\Query\Expression\ExpressionBuilder::isNull ($x) : string

Creates an IS NULL expression with the given arguments.

method Doctrine\DBAL\Query\Expression\ExpressionBuilder::isNotNull ($x) : string

Creates an IS NOT NULL expression with the given arguments.

method Doctrine\DBAL\Query\Expression\ExpressionBuilder::like ($x, $y) : string

Creates a LIKE() comparison expression with the given arguments.

method Doctrine\DBAL\Query\Expression\ExpressionBuilder::notLike ($x, $y) : string

Creates a NOT LIKE() comparison expression with the given arguments.

method Doctrine\DBAL\Query\Expression\ExpressionBuilder::in ($x, $y) : string

Creates a IN () comparison expression with the given arguments.

method Doctrine\DBAL\Query\Expression\ExpressionBuilder::notIn ($x, $y) : string

Creates a NOT IN () comparison expression with the given arguments.

method Doctrine\DBAL\Query\Expression\ExpressionBuilder::literal ($input, $type = null) : string

Quotes a given input parameter.

class Doctrine\DBAL\Query\Expression::CompositeExpression

Composite expression is responsible to build a group of similar expression.

classconstant string Doctrine\DBAL\Query\Expression\CompositeExpression::TYPE_AND

Constant that represents an AND composite expression.

classconstant string Doctrine\DBAL\Query\Expression\CompositeExpression::TYPE_OR

Constant that represents an OR composite expression.

method Doctrine\DBAL\Query\Expression\CompositeExpression::__construct ($type, $parts = []) : void

method Doctrine\DBAL\Query\Expression\CompositeExpression::addMultiple ($parts = []) : Doctrine\DBAL\Query\Expression\CompositeExpression

Adds multiple parts to composite expression.

method Doctrine\DBAL\Query\Expression\CompositeExpression::add ($part) : Doctrine\DBAL\Query\Expression\CompositeExpression

Adds an expression to composite expression.

method Doctrine\DBAL\Query\Expression\CompositeExpression::count () : int

Retrieves the amount of expressions on composite expression.

method Doctrine\DBAL\Query\Expression\CompositeExpression::__toString () : string

Retrieves the string representation of this composite expression.

method Doctrine\DBAL\Query\Expression\CompositeExpression::getType () : string

Returns the type of this composite expression (AND/OR).

class Doctrine\DBAL\Query::QueryBuilder

QueryBuilder class is responsible to dynamically create SQL queries.

Important: Verify that every feature you use will work with your database vendor.
SQL Query Builder does not attempt to validate the generated SQL at all.

The query builder does no validation whatsoever if certain features even work with the
underlying database vendor. Limit queries and joins are NOT applied to UPDATE and DELETE statements
even if some vendors such as MySQL support it.

classconstant integer Doctrine\DBAL\Query\QueryBuilder::SELECT

classconstant integer Doctrine\DBAL\Query\QueryBuilder::DELETE

classconstant integer Doctrine\DBAL\Query\QueryBuilder::UPDATE

classconstant integer Doctrine\DBAL\Query\QueryBuilder::INSERT

classconstant integer Doctrine\DBAL\Query\QueryBuilder::STATE_DIRTY

classconstant integer Doctrine\DBAL\Query\QueryBuilder::STATE_CLEAN

method Doctrine\DBAL\Query\QueryBuilder::__construct ($connection) : void

Initializes a new QueryBuilder.

method Doctrine\DBAL\Query\QueryBuilder::expr () : Doctrine\DBAL\Query\Expression\ExpressionBuilder

Gets an ExpressionBuilder used for object-oriented construction of query expressions.
This producer method is intended for convenient inline usage. Example:

$qb = $conn->createQueryBuilder()
    ->select('u')
    ->from('users', 'u')
    ->where($qb->expr()->eq('u.id', 1));

For more complex expression construction, consider storing the expression
builder object in a local variable.

method Doctrine\DBAL\Query\QueryBuilder::getType () : int

Gets the type of the currently built query.

method Doctrine\DBAL\Query\QueryBuilder::getConnection () : Doctrine\DBAL\Connection

Gets the associated DBAL Connection for this query builder.

method Doctrine\DBAL\Query\QueryBuilder::getState () : int

Gets the state of this query builder instance.

method Doctrine\DBAL\Query\QueryBuilder::execute () : Doctrine\DBAL\Driver\Statementint

Executes this query using the bound parameters and their types.

Uses Doctrine\DBAL\Connection::executeQuery() for select statements and Doctrine\DBAL\Connection::executeUpdate()
for insert, update and delete statements.

method Doctrine\DBAL\Query\QueryBuilder::getSQL () : string

Gets the complete SQL string formed by the current specifications of this QueryBuilder.

$qb = $em->createQueryBuilder()
    ->select('u')
    ->from('User', 'u')
echo $qb->getSQL(); // SELECT u FROM User u

method Doctrine\DBAL\Query\QueryBuilder::setParameter ($key, $value, $type = null) : Doctrine\DBAL\Query\QueryBuilder

Sets a query parameter for the query being constructed.

$qb = $conn->createQueryBuilder()
    ->select('u')
    ->from('users', 'u')
    ->where('u.id = :user_id')
    ->setParameter(':user_id', 1);

method Doctrine\DBAL\Query\QueryBuilder::setParameters ($params, $types = []) : Doctrine\DBAL\Query\QueryBuilder

Sets a collection of query parameters for the query being constructed.

$qb = $conn->createQueryBuilder()
    ->select('u')
    ->from('users', 'u')
    ->where('u.id = :user_id1 OR u.id = :user_id2')
    ->setParameters(array(
        ':user_id1' => 1,
        ':user_id2' => 2
    ));

method Doctrine\DBAL\Query\QueryBuilder::getParameters () : mixed[]

Gets all defined query parameters for the query being constructed indexed by parameter index or name.

method Doctrine\DBAL\Query\QueryBuilder::getParameter ($key) : mixed

Gets a (previously set) query parameter of the query being constructed.

method Doctrine\DBAL\Query\QueryBuilder::getParameterTypes () : int[]string[]

Gets all defined query parameter types for the query being constructed indexed by parameter index or name.

method Doctrine\DBAL\Query\QueryBuilder::getParameterType ($key) : mixed

Gets a (previously set) query parameter type of the query being constructed.

method Doctrine\DBAL\Query\QueryBuilder::setFirstResult ($firstResult) : Doctrine\DBAL\Query\QueryBuilder

Sets the position of the first result to retrieve (the "offset").

method Doctrine\DBAL\Query\QueryBuilder::getFirstResult () : int

Gets the position of the first result the query object was set to retrieve (the "offset").
Returns NULL if setFirstResult was not applied to this QueryBuilder.

method Doctrine\DBAL\Query\QueryBuilder::setMaxResults ($maxResults) : Doctrine\DBAL\Query\QueryBuilder

Sets the maximum number of results to retrieve (the "limit").

method Doctrine\DBAL\Query\QueryBuilder::getMaxResults () : int

Gets the maximum number of results the query object was set to retrieve (the "limit").
Returns NULL if setMaxResults was not applied to this query builder.

method Doctrine\DBAL\Query\QueryBuilder::add ($sqlPartName, $sqlPart, $append = false) : Doctrine\DBAL\Query\QueryBuilder

Either appends to or replaces a single, generic query part.

The available parts are: 'select', 'from', 'set', 'where',
'groupBy', 'having' and 'orderBy'.

method Doctrine\DBAL\Query\QueryBuilder::select ($select = null) : Doctrine\DBAL\Query\QueryBuilder

Specifies an item that is to be returned in the query result.
Replaces any previously specified selections, if any.

$qb = $conn->createQueryBuilder()
    ->select('u.id', 'p.id')
    ->from('users', 'u')
    ->leftJoin('u', 'phonenumbers', 'p', 'u.id = p.user_id');

method Doctrine\DBAL\Query\QueryBuilder::distinct () : Doctrine\DBAL\Query\QueryBuilder

Adds DISTINCT to the query.

$qb = $conn->createQueryBuilder()
    ->select('u.id')
    ->distinct()
    ->from('users', 'u')

method Doctrine\DBAL\Query\QueryBuilder::addSelect ($select = null) : Doctrine\DBAL\Query\QueryBuilder

Adds an item that is to be returned in the query result.

$qb = $conn->createQueryBuilder()
    ->select('u.id')
    ->addSelect('p.id')
    ->from('users', 'u')
    ->leftJoin('u', 'phonenumbers', 'u.id = p.user_id');

method Doctrine\DBAL\Query\QueryBuilder::delete ($delete = null, $alias = null) : Doctrine\DBAL\Query\QueryBuilder

Turns the query being built into a bulk delete query that ranges over
a certain table.

$qb = $conn->createQueryBuilder()
    ->delete('users', 'u')
    ->where('u.id = :user_id')
    ->setParameter(':user_id', 1);

method Doctrine\DBAL\Query\QueryBuilder::update ($update = null, $alias = null) : Doctrine\DBAL\Query\QueryBuilder

Turns the query being built into a bulk update query that ranges over
a certain table

$qb = $conn->createQueryBuilder()
    ->update('counters', 'c')
    ->set('c.value', 'c.value + 1')
    ->where('c.id = ?');

method Doctrine\DBAL\Query\QueryBuilder::insert ($insert = null) : Doctrine\DBAL\Query\QueryBuilder

Turns the query being built into an insert query that inserts into
a certain table

$qb = $conn->createQueryBuilder()
    ->insert('users')
    ->values(
        array(
            'name' => '?',
            'password' => '?'
        )
    );

method Doctrine\DBAL\Query\QueryBuilder::from ($from, $alias = null) : Doctrine\DBAL\Query\QueryBuilder

Creates and adds a query root corresponding to the table identified by the
given alias, forming a cartesian product with any existing query roots.

$qb = $conn->createQueryBuilder()
    ->select('u.id')
    ->from('users', 'u')

method Doctrine\DBAL\Query\QueryBuilder::join ($fromAlias, $join, $alias, $condition = null) : Doctrine\DBAL\Query\QueryBuilder

Creates and adds a join to the query.

$qb = $conn->createQueryBuilder()
    ->select('u.name')
    ->from('users', 'u')
    ->join('u', 'phonenumbers', 'p', 'p.is_primary = 1');

method Doctrine\DBAL\Query\QueryBuilder::innerJoin ($fromAlias, $join, $alias, $condition = null) : Doctrine\DBAL\Query\QueryBuilder

Creates and adds a join to the query.

$qb = $conn->createQueryBuilder()
    ->select('u.name')
    ->from('users', 'u')
    ->innerJoin('u', 'phonenumbers', 'p', 'p.is_primary = 1');

method Doctrine\DBAL\Query\QueryBuilder::leftJoin ($fromAlias, $join, $alias, $condition = null) : Doctrine\DBAL\Query\QueryBuilder

Creates and adds a left join to the query.

$qb = $conn->createQueryBuilder()
    ->select('u.name')
    ->from('users', 'u')
    ->leftJoin('u', 'phonenumbers', 'p', 'p.is_primary = 1');

method Doctrine\DBAL\Query\QueryBuilder::rightJoin ($fromAlias, $join, $alias, $condition = null) : Doctrine\DBAL\Query\QueryBuilder

Creates and adds a right join to the query.

$qb = $conn->createQueryBuilder()
    ->select('u.name')
    ->from('users', 'u')
    ->rightJoin('u', 'phonenumbers', 'p', 'p.is_primary = 1');

method Doctrine\DBAL\Query\QueryBuilder::set ($key, $value) : Doctrine\DBAL\Query\QueryBuilder

Sets a new value for a column in a bulk update query.

$qb = $conn->createQueryBuilder()
    ->update('counters', 'c')
    ->set('c.value', 'c.value + 1')
    ->where('c.id = ?');

method Doctrine\DBAL\Query\QueryBuilder::where ($predicates) : Doctrine\DBAL\Query\QueryBuilder

Specifies one or more restrictions to the query result.
Replaces any previously specified restrictions, if any.

$qb = $conn->createQueryBuilder()
    ->select('c.value')
    ->from('counters', 'c')
    ->where('c.id = ?');

// You can optionally programatically build and/or expressions
$qb = $conn->createQueryBuilder();

$or = $qb->expr()->orx();
$or->add($qb->expr()->eq('c.id', 1));
$or->add($qb->expr()->eq('c.id', 2));

$qb->update('counters', 'c')
    ->set('c.value', 'c.value + 1')
    ->where($or);

method Doctrine\DBAL\Query\QueryBuilder::andWhere ($where) : Doctrine\DBAL\Query\QueryBuilder

Adds one or more restrictions to the query results, forming a logical
conjunction with any previously specified restrictions.

$qb = $conn->createQueryBuilder()
    ->select('u')
    ->from('users', 'u')
    ->where('u.username LIKE ?')
    ->andWhere('u.is_active = 1');

method Doctrine\DBAL\Query\QueryBuilder::orWhere ($where) : Doctrine\DBAL\Query\QueryBuilder

Adds one or more restrictions to the query results, forming a logical
disjunction with any previously specified restrictions.

$qb = $em->createQueryBuilder()
    ->select('u.name')
    ->from('users', 'u')
    ->where('u.id = 1')
    ->orWhere('u.id = 2');

method Doctrine\DBAL\Query\QueryBuilder::groupBy ($groupBy) : Doctrine\DBAL\Query\QueryBuilder

Specifies a grouping over the results of the query.
Replaces any previously specified groupings, if any.

$qb = $conn->createQueryBuilder()
    ->select('u.name')
    ->from('users', 'u')
    ->groupBy('u.id');

method Doctrine\DBAL\Query\QueryBuilder::addGroupBy ($groupBy) : Doctrine\DBAL\Query\QueryBuilder

Adds a grouping expression to the query.

$qb = $conn->createQueryBuilder()
    ->select('u.name')
    ->from('users', 'u')
    ->groupBy('u.lastLogin')
    ->addGroupBy('u.createdAt');

method Doctrine\DBAL\Query\QueryBuilder::setValue ($column, $value) : Doctrine\DBAL\Query\QueryBuilder

Sets a value for a column in an insert query.

$qb = $conn->createQueryBuilder()
    ->insert('users')
    ->values(
        array(
            'name' => '?'
        )
    )
    ->setValue('password', '?');

method Doctrine\DBAL\Query\QueryBuilder::values ($values) : Doctrine\DBAL\Query\QueryBuilder

Specifies values for an insert query indexed by column names.
Replaces any previous values, if any.

$qb = $conn->createQueryBuilder()
    ->insert('users')
    ->values(
        array(
            'name' => '?',
            'password' => '?'
        )
    );

method Doctrine\DBAL\Query\QueryBuilder::having ($having) : Doctrine\DBAL\Query\QueryBuilder

Specifies a restriction over the groups of the query.
Replaces any previous having restrictions, if any.

method Doctrine\DBAL\Query\QueryBuilder::andHaving ($having) : Doctrine\DBAL\Query\QueryBuilder

Adds a restriction over the groups of the query, forming a logical
conjunction with any existing having restrictions.

method Doctrine\DBAL\Query\QueryBuilder::orHaving ($having) : Doctrine\DBAL\Query\QueryBuilder

Adds a restriction over the groups of the query, forming a logical
disjunction with any existing having restrictions.

method Doctrine\DBAL\Query\QueryBuilder::orderBy ($sort, $order = null) : Doctrine\DBAL\Query\QueryBuilder

Specifies an ordering for the query results.
Replaces any previously specified orderings, if any.

method Doctrine\DBAL\Query\QueryBuilder::addOrderBy ($sort, $order = null) : Doctrine\DBAL\Query\QueryBuilder

Adds an ordering to the query results.

method Doctrine\DBAL\Query\QueryBuilder::getQueryPart ($queryPartName) : mixed

Gets a query part by its name.

method Doctrine\DBAL\Query\QueryBuilder::getQueryParts () : mixed[]

Gets all query parts.

method Doctrine\DBAL\Query\QueryBuilder::resetQueryParts ($queryPartNames = null) : Doctrine\DBAL\Query\QueryBuilder

Resets SQL parts.

method Doctrine\DBAL\Query\QueryBuilder::resetQueryPart ($queryPartName) : Doctrine\DBAL\Query\QueryBuilder

Resets a single SQL part.

method Doctrine\DBAL\Query\QueryBuilder::__toString () : string

Gets a string representation of this QueryBuilder which corresponds to
the final SQL query being constructed.

method Doctrine\DBAL\Query\QueryBuilder::createNamedParameter ($value, $type = Doctrine\DBAL\ParameterType::STRING, $placeHolder = null) : string

Creates a new named parameter and bind the value $value to it.

This method provides a shortcut for PDOStatement::bindValue
when using prepared statements.

The parameter $value specifies the value that you want to bind. If
$placeholder is not provided bindValue() will automatically create a
placeholder for you. An automatic placeholder will be of the name
':dcValue1', ':dcValue2' etc.

For more information see

Example:

$value = 2;
$q->eq( 'id', $q->bindValue( $value ) );
$stmt = $q->executeQuery(); // executed with 'id = 2'

method Doctrine\DBAL\Query\QueryBuilder::createPositionalParameter ($value, $type = Doctrine\DBAL\ParameterType::STRING) : string

Creates a new positional parameter and bind the given value to it.

Attention: If you are using positional parameters with the query builder you have
to be very careful to bind all parameters in the order they appear in the SQL
statement , otherwise they get bound in the wrong order which can lead to serious
bugs in your code.

Example:

$qb = $conn->createQueryBuilder();
$qb->select('u.*')

->from('users', 'u')
->where('u.username = ' . $qb->createPositionalParameter('Foo', ParameterType::STRING))
->orWhere('u.username = ' . $qb->createPositionalParameter('Bar', ParameterType::STRING))

method Doctrine\DBAL\Query\QueryBuilder::__clone () : void

Deep clone of all expression objects in the SQL parts.

class Doctrine\DBAL\Query::QueryException

property string Doctrine\DBAL\Query\QueryException::message

property integer Doctrine\DBAL\Query\QueryException::code

property NULL Doctrine\DBAL\Query\QueryException::file

property NULL Doctrine\DBAL\Query\QueryException::line

method Doctrine\DBAL\Query\QueryException::unknownAlias ($alias, $registeredAliases) : Doctrine\DBAL\Query\QueryException

method Doctrine\DBAL\Query\QueryException::nonUniqueAlias ($alias, $registeredAliases) : Doctrine\DBAL\Query\QueryException

method Doctrine\DBAL\Query\QueryException::notSupported ($method) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Query\QueryException::invalidPlatformSpecified () : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Query\QueryException::invalidPlatformType ($invalidPlatform) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Query\QueryException::invalidPlatformVersionSpecified ($version, $expectedFormat) : Doctrine\DBAL\DBALException

Returns a new instance for an invalid specified platform version.

method Doctrine\DBAL\Query\QueryException::invalidPdoInstance () : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Query\QueryException::driverRequired ($url = null) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Query\QueryException::unknownDriver ($unknownDriverName, $knownDrivers) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Query\QueryException::driverExceptionDuringQuery ($driver, $driverEx, $sql, $params = []) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Query\QueryException::driverException ($driver, $driverEx) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Query\QueryException::invalidWrapperClass ($wrapperClass) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Query\QueryException::invalidDriverClass ($driverClass) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Query\QueryException::invalidTableName ($tableName) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Query\QueryException::noColumnsSpecifiedForTable ($tableName) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Query\QueryException::limitOffsetInvalid () : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Query\QueryException::typeExists ($name) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Query\QueryException::unknownColumnType ($name) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Query\QueryException::typeNotFound ($name) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Query\QueryException::typeNotRegistered ($type) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Query\QueryException::typeAlreadyRegistered ($type) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Query\QueryException::__construct ($message, $code, $previous) : void

method Doctrine\DBAL\Query\QueryException::__wakeup () : void

method Doctrine\DBAL\Query\QueryException::getMessage () : void

method Doctrine\DBAL\Query\QueryException::getCode () : void

method Doctrine\DBAL\Query\QueryException::getFile () : void

method Doctrine\DBAL\Query\QueryException::getLine () : void

method Doctrine\DBAL\Query\QueryException::getTrace () : void

method Doctrine\DBAL\Query\QueryException::getPrevious () : void

method Doctrine\DBAL\Query\QueryException::getTraceAsString () : void

method Doctrine\DBAL\Query\QueryException::__toString () : void

namespace Doctrine\DBAL\Schema

namespace Doctrine\DBAL\Schema\Visitor

class Doctrine\DBAL\Schema\Visitor::AbstractVisitor

Abstract Visitor with empty methods for easy extension.

method Doctrine\DBAL\Schema\Visitor\AbstractVisitor::acceptSchema ($schema) : void

method Doctrine\DBAL\Schema\Visitor\AbstractVisitor::acceptNamespace ($namespaceName) : void

Accepts a schema namespace name.

method Doctrine\DBAL\Schema\Visitor\AbstractVisitor::acceptTable ($table) : void

method Doctrine\DBAL\Schema\Visitor\AbstractVisitor::acceptColumn ($table, $column) : void

method Doctrine\DBAL\Schema\Visitor\AbstractVisitor::acceptForeignKey ($localTable, $fkConstraint) : void

method Doctrine\DBAL\Schema\Visitor\AbstractVisitor::acceptIndex ($table, $index) : void

method Doctrine\DBAL\Schema\Visitor\AbstractVisitor::acceptSequence ($sequence) : void

class Doctrine\DBAL\Schema\Visitor::CreateSchemaSqlCollector

method Doctrine\DBAL\Schema\Visitor\CreateSchemaSqlCollector::__construct ($platform) : void

method Doctrine\DBAL\Schema\Visitor\CreateSchemaSqlCollector::acceptNamespace ($namespaceName) : void

Accepts a schema namespace name.

method Doctrine\DBAL\Schema\Visitor\CreateSchemaSqlCollector::acceptTable ($table) : void

method Doctrine\DBAL\Schema\Visitor\CreateSchemaSqlCollector::acceptForeignKey ($localTable, $fkConstraint) : void

method Doctrine\DBAL\Schema\Visitor\CreateSchemaSqlCollector::acceptSequence ($sequence) : void

method Doctrine\DBAL\Schema\Visitor\CreateSchemaSqlCollector::resetQueries () : void

method Doctrine\DBAL\Schema\Visitor\CreateSchemaSqlCollector::getQueries () : string[]

Gets all queries collected so far.

method Doctrine\DBAL\Schema\Visitor\CreateSchemaSqlCollector::acceptSchema ($schema) : void

method Doctrine\DBAL\Schema\Visitor\CreateSchemaSqlCollector::acceptColumn ($table, $column) : void

method Doctrine\DBAL\Schema\Visitor\CreateSchemaSqlCollector::acceptIndex ($table, $index) : void

class Doctrine\DBAL\Schema\Visitor::DropSchemaSqlCollector

Gathers SQL statements that allow to completely drop the current schema.

method Doctrine\DBAL\Schema\Visitor\DropSchemaSqlCollector::__construct ($platform) : void

method Doctrine\DBAL\Schema\Visitor\DropSchemaSqlCollector::acceptTable ($table) : void

method Doctrine\DBAL\Schema\Visitor\DropSchemaSqlCollector::acceptForeignKey ($localTable, $fkConstraint) : void

method Doctrine\DBAL\Schema\Visitor\DropSchemaSqlCollector::acceptSequence ($sequence) : void

method Doctrine\DBAL\Schema\Visitor\DropSchemaSqlCollector::clearQueries () : void

method Doctrine\DBAL\Schema\Visitor\DropSchemaSqlCollector::getQueries () : string[]

method Doctrine\DBAL\Schema\Visitor\DropSchemaSqlCollector::acceptSchema ($schema) : void

method Doctrine\DBAL\Schema\Visitor\DropSchemaSqlCollector::acceptNamespace ($namespaceName) : void

Accepts a schema namespace name.

method Doctrine\DBAL\Schema\Visitor\DropSchemaSqlCollector::acceptColumn ($table, $column) : void

method Doctrine\DBAL\Schema\Visitor\DropSchemaSqlCollector::acceptIndex ($table, $index) : void

interface Doctrine\DBAL\Schema\Visitor::Visitor

Schema Visitor used for Validation or Generation purposes.

method Doctrine\DBAL\Schema\Visitor\Visitor::acceptSchema ($schema) : void

method Doctrine\DBAL\Schema\Visitor\Visitor::acceptTable ($table) : void

method Doctrine\DBAL\Schema\Visitor\Visitor::acceptColumn ($table, $column) : void

method Doctrine\DBAL\Schema\Visitor\Visitor::acceptForeignKey ($localTable, $fkConstraint) : void

method Doctrine\DBAL\Schema\Visitor\Visitor::acceptIndex ($table, $index) : void

method Doctrine\DBAL\Schema\Visitor\Visitor::acceptSequence ($sequence) : void

interface Doctrine\DBAL\Schema\Visitor::NamespaceVisitor

Visitor that can visit schema namespaces.

method Doctrine\DBAL\Schema\Visitor\NamespaceVisitor::acceptNamespace ($namespaceName) : void

Accepts a schema namespace name.

class Doctrine\DBAL\Schema::AbstractAsset

The abstract asset allows to reset the name of all assets without publishing this to the public userland.

This encapsulation hack is necessary to keep a consistent state of the database schema. Say we have a list of tables
array($tableName => Table($tableName)); if you want to rename the table, you have to make sure

property string Doctrine\DBAL\Schema\AbstractAsset::_name

property stringnull Doctrine\DBAL\Schema\AbstractAsset::_namespace

Namespace of the asset. If none isset the default namespace is assumed.

property bool Doctrine\DBAL\Schema\AbstractAsset::_quoted

method Doctrine\DBAL\Schema\AbstractAsset::_setName ($name) : void

Sets the name of this asset.

method Doctrine\DBAL\Schema\AbstractAsset::isInDefaultNamespace ($defaultNamespaceName) : bool

Is this asset in the default namespace?

method Doctrine\DBAL\Schema\AbstractAsset::getNamespaceName () : stringnull

Gets the namespace name of this asset.

If NULL is returned this means the default namespace is used.

method Doctrine\DBAL\Schema\AbstractAsset::getShortestName ($defaultNamespaceName) : string

The shortest name is stripped of the default namespace. All other
namespaced elements are returned as full-qualified names.

method Doctrine\DBAL\Schema\AbstractAsset::getFullQualifiedName ($defaultNamespaceName) : string

The normalized name is full-qualified and lowerspaced. Lowerspacing is
actually wrong, but we have to do it to keep our sanity. If you are
using database objects that only differentiate in the casing (FOO vs
Foo) then you will NOT be able to use Doctrine Schema abstraction.

Every non-namespaced element is prefixed with the default namespace
name which is passed as argument to this method.

method Doctrine\DBAL\Schema\AbstractAsset::isQuoted () : bool

Checks if this asset's name is quoted.

method Doctrine\DBAL\Schema\AbstractAsset::isIdentifierQuoted ($identifier) : bool

Checks if this identifier is quoted.

method Doctrine\DBAL\Schema\AbstractAsset::trimQuotes ($identifier) : string

Trim quotes from the identifier.

method Doctrine\DBAL\Schema\AbstractAsset::getName () : string

Returns the name of this schema asset.

method Doctrine\DBAL\Schema\AbstractAsset::getQuotedName ($platform) : string

Gets the quoted representation of this asset but only if it was defined with one. Otherwise
return the plain unquoted value as inserted.

method Doctrine\DBAL\Schema\AbstractAsset::_generateIdentifierName ($columnNames, $prefix = "", $maxSize = 30) : string

Generates an identifier from a list of column names obeying a certain string length.

This is especially important for Oracle, since it does not allow identifiers larger than 30 chars,
however building idents automatically for foreign keys, composite keys or such can easily create
very long names.

class Doctrine\DBAL\Schema::Column

Object representation of a database column.

property Doctrine\DBAL\Types\Type Doctrine\DBAL\Schema\Column::_type

property intnull Doctrine\DBAL\Schema\Column::_length

property int Doctrine\DBAL\Schema\Column::_precision

property int Doctrine\DBAL\Schema\Column::_scale

property bool Doctrine\DBAL\Schema\Column::_unsigned

property bool Doctrine\DBAL\Schema\Column::_fixed

property bool Doctrine\DBAL\Schema\Column::_notnull

property stringnull Doctrine\DBAL\Schema\Column::_default

property bool Doctrine\DBAL\Schema\Column::_autoincrement

property mixed[] Doctrine\DBAL\Schema\Column::_platformOptions

property stringnull Doctrine\DBAL\Schema\Column::_columnDefinition

property stringnull Doctrine\DBAL\Schema\Column::_comment

property mixed[] Doctrine\DBAL\Schema\Column::_customSchemaOptions

property string Doctrine\DBAL\Schema\Column::_name

property stringnull Doctrine\DBAL\Schema\Column::_namespace

Namespace of the asset. If none isset the default namespace is assumed.

property bool Doctrine\DBAL\Schema\Column::_quoted

method Doctrine\DBAL\Schema\Column::__construct ($columnName, $type, $options = []) : void

Creates a new Column.

method Doctrine\DBAL\Schema\Column::setOptions ($options) : Doctrine\DBAL\Schema\Column

method Doctrine\DBAL\Schema\Column::setType ($type) : Doctrine\DBAL\Schema\Column

method Doctrine\DBAL\Schema\Column::setLength ($length) : Doctrine\DBAL\Schema\Column

method Doctrine\DBAL\Schema\Column::setPrecision ($precision) : Doctrine\DBAL\Schema\Column

method Doctrine\DBAL\Schema\Column::setScale ($scale) : Doctrine\DBAL\Schema\Column

method Doctrine\DBAL\Schema\Column::setUnsigned ($unsigned) : Doctrine\DBAL\Schema\Column

method Doctrine\DBAL\Schema\Column::setFixed ($fixed) : Doctrine\DBAL\Schema\Column

method Doctrine\DBAL\Schema\Column::setNotnull ($notnull) : Doctrine\DBAL\Schema\Column

method Doctrine\DBAL\Schema\Column::setDefault ($default) : Doctrine\DBAL\Schema\Column

method Doctrine\DBAL\Schema\Column::setPlatformOptions ($platformOptions) : Doctrine\DBAL\Schema\Column

method Doctrine\DBAL\Schema\Column::setPlatformOption ($name, $value) : Doctrine\DBAL\Schema\Column

method Doctrine\DBAL\Schema\Column::setColumnDefinition ($value) : Doctrine\DBAL\Schema\Column

method Doctrine\DBAL\Schema\Column::getType () : Doctrine\DBAL\Types\Type

method Doctrine\DBAL\Schema\Column::getLength () : intnull

method Doctrine\DBAL\Schema\Column::getPrecision () : int

method Doctrine\DBAL\Schema\Column::getScale () : int

method Doctrine\DBAL\Schema\Column::getUnsigned () : bool

method Doctrine\DBAL\Schema\Column::getFixed () : bool

method Doctrine\DBAL\Schema\Column::getNotnull () : bool

method Doctrine\DBAL\Schema\Column::getDefault () : stringnull

method Doctrine\DBAL\Schema\Column::getPlatformOptions () : mixed[]

method Doctrine\DBAL\Schema\Column::hasPlatformOption ($name) : bool

method Doctrine\DBAL\Schema\Column::getPlatformOption ($name) : mixed

method Doctrine\DBAL\Schema\Column::getColumnDefinition () : stringnull

method Doctrine\DBAL\Schema\Column::getAutoincrement () : bool

method Doctrine\DBAL\Schema\Column::setAutoincrement ($flag) : Doctrine\DBAL\Schema\Column

method Doctrine\DBAL\Schema\Column::setComment ($comment) : Doctrine\DBAL\Schema\Column

method Doctrine\DBAL\Schema\Column::getComment () : stringnull

method Doctrine\DBAL\Schema\Column::setCustomSchemaOption ($name, $value) : Doctrine\DBAL\Schema\Column

method Doctrine\DBAL\Schema\Column::hasCustomSchemaOption ($name) : bool

method Doctrine\DBAL\Schema\Column::getCustomSchemaOption ($name) : mixed

method Doctrine\DBAL\Schema\Column::setCustomSchemaOptions ($customSchemaOptions) : Doctrine\DBAL\Schema\Column

method Doctrine\DBAL\Schema\Column::getCustomSchemaOptions () : mixed[]

method Doctrine\DBAL\Schema\Column::toArray () : mixed[]

method Doctrine\DBAL\Schema\Column::_setName ($name) : void

Sets the name of this asset.

method Doctrine\DBAL\Schema\Column::isInDefaultNamespace ($defaultNamespaceName) : bool

Is this asset in the default namespace?

method Doctrine\DBAL\Schema\Column::getNamespaceName () : stringnull

Gets the namespace name of this asset.

If NULL is returned this means the default namespace is used.

method Doctrine\DBAL\Schema\Column::getShortestName ($defaultNamespaceName) : string

The shortest name is stripped of the default namespace. All other
namespaced elements are returned as full-qualified names.

method Doctrine\DBAL\Schema\Column::getFullQualifiedName ($defaultNamespaceName) : string

The normalized name is full-qualified and lowerspaced. Lowerspacing is
actually wrong, but we have to do it to keep our sanity. If you are
using database objects that only differentiate in the casing (FOO vs
Foo) then you will NOT be able to use Doctrine Schema abstraction.

Every non-namespaced element is prefixed with the default namespace
name which is passed as argument to this method.

method Doctrine\DBAL\Schema\Column::isQuoted () : bool

Checks if this asset's name is quoted.

method Doctrine\DBAL\Schema\Column::isIdentifierQuoted ($identifier) : bool

Checks if this identifier is quoted.

method Doctrine\DBAL\Schema\Column::trimQuotes ($identifier) : string

Trim quotes from the identifier.

method Doctrine\DBAL\Schema\Column::getName () : string

Returns the name of this schema asset.

method Doctrine\DBAL\Schema\Column::getQuotedName ($platform) : string

Gets the quoted representation of this asset but only if it was defined with one. Otherwise
return the plain unquoted value as inserted.

method Doctrine\DBAL\Schema\Column::_generateIdentifierName ($columnNames, $prefix = "", $maxSize = 30) : string

Generates an identifier from a list of column names obeying a certain string length.

This is especially important for Oracle, since it does not allow identifiers larger than 30 chars,
however building idents automatically for foreign keys, composite keys or such can easily create
very long names.

class Doctrine\DBAL\Schema::TableDiff

Table Diff.

property string Doctrine\DBAL\Schema\TableDiff::name

property stringfalse Doctrine\DBAL\Schema\TableDiff::newName

property Doctrine\DBAL\Schema\Column[] Doctrine\DBAL\Schema\TableDiff::addedColumns

All added fields.

property Doctrine\DBAL\Schema\ColumnDiff[] Doctrine\DBAL\Schema\TableDiff::changedColumns

All changed fields.

property Doctrine\DBAL\Schema\Column[] Doctrine\DBAL\Schema\TableDiff::removedColumns

All removed fields.

property Doctrine\DBAL\Schema\Column[] Doctrine\DBAL\Schema\TableDiff::renamedColumns

Columns that are only renamed from key to column instance name.

property Doctrine\DBAL\Schema\Index[] Doctrine\DBAL\Schema\TableDiff::addedIndexes

All added indexes.

property Doctrine\DBAL\Schema\Index[] Doctrine\DBAL\Schema\TableDiff::changedIndexes

All changed indexes.

property Doctrine\DBAL\Schema\Index[] Doctrine\DBAL\Schema\TableDiff::removedIndexes

All removed indexes

property Doctrine\DBAL\Schema\Index[] Doctrine\DBAL\Schema\TableDiff::renamedIndexes

Indexes that are only renamed but are identical otherwise.

property Doctrine\DBAL\Schema\ForeignKeyConstraint[] Doctrine\DBAL\Schema\TableDiff::addedForeignKeys

All added foreign key definitions

property Doctrine\DBAL\Schema\ForeignKeyConstraint[] Doctrine\DBAL\Schema\TableDiff::changedForeignKeys

All changed foreign keys

property Doctrine\DBAL\Schema\ForeignKeyConstraint[]string[] Doctrine\DBAL\Schema\TableDiff::removedForeignKeys

All removed foreign keys

property Doctrine\DBAL\Schema\Tablenull Doctrine\DBAL\Schema\TableDiff::fromTable

method Doctrine\DBAL\Schema\TableDiff::__construct ($tableName, $addedColumns = [], $changedColumns = [], $removedColumns = [], $addedIndexes = [], $changedIndexes = [], $removedIndexes = [], $fromTable = null) : void

Constructs an TableDiff object.

method Doctrine\DBAL\Schema\TableDiff::getName ($platform) : Doctrine\DBAL\Schema\Identifier

method Doctrine\DBAL\Schema\TableDiff::getNewName () : Doctrine\DBAL\Schema\Identifierfalse

class Doctrine\DBAL\Schema::ColumnDiff

Represents the change of a column.

property string Doctrine\DBAL\Schema\ColumnDiff::oldColumnName

property Doctrine\DBAL\Schema\Column Doctrine\DBAL\Schema\ColumnDiff::column

property string[] Doctrine\DBAL\Schema\ColumnDiff::changedProperties

property Doctrine\DBAL\Schema\Columnnull Doctrine\DBAL\Schema\ColumnDiff::fromColumn

method Doctrine\DBAL\Schema\ColumnDiff::__construct ($oldColumnName, $column, $changedProperties = [], $fromColumn = null) : void

method Doctrine\DBAL\Schema\ColumnDiff::hasChanged ($propertyName) : bool

method Doctrine\DBAL\Schema\ColumnDiff::getOldColumnName () : Doctrine\DBAL\Schema\Identifier

class Doctrine\DBAL\Schema::Table

Object Representation of a table.

property Doctrine\DBAL\Schema\Column[] Doctrine\DBAL\Schema\Table::_columns

property Doctrine\DBAL\Schema\Index[] Doctrine\DBAL\Schema\Table::_indexes

property string Doctrine\DBAL\Schema\Table::_primaryKeyName

property Doctrine\DBAL\Schema\ForeignKeyConstraint[] Doctrine\DBAL\Schema\Table::_fkConstraints

property mixed[] Doctrine\DBAL\Schema\Table::_options

property Doctrine\DBAL\Schema\SchemaConfignull Doctrine\DBAL\Schema\Table::_schemaConfig

property string Doctrine\DBAL\Schema\Table::_name

property stringnull Doctrine\DBAL\Schema\Table::_namespace

Namespace of the asset. If none isset the default namespace is assumed.

property bool Doctrine\DBAL\Schema\Table::_quoted

method Doctrine\DBAL\Schema\Table::__construct ($tableName, $columns = [], $indexes = [], $fkConstraints = [], $idGeneratorType = 0, $options = []) : void

method Doctrine\DBAL\Schema\Table::setSchemaConfig ($schemaConfig) : void

method Doctrine\DBAL\Schema\Table::_getMaxIdentifierLength () : int

method Doctrine\DBAL\Schema\Table::setPrimaryKey ($columnNames, $indexName = false) : Doctrine\DBAL\Schema\Table

Sets the Primary Key.

method Doctrine\DBAL\Schema\Table::addIndex ($columnNames, $indexName = null, $flags = [], $options = []) : Doctrine\DBAL\Schema\Table

method Doctrine\DBAL\Schema\Table::dropPrimaryKey () : void

Drops the primary key from this table.

method Doctrine\DBAL\Schema\Table::dropIndex ($indexName) : void

Drops an index from this table.

method Doctrine\DBAL\Schema\Table::addUniqueIndex ($columnNames, $indexName = null, $options = []) : Doctrine\DBAL\Schema\Table

method Doctrine\DBAL\Schema\Table::renameIndex ($oldIndexName, $newIndexName = null) : Doctrine\DBAL\Schema\Table

Renames an index.

method Doctrine\DBAL\Schema\Table::columnsAreIndexed ($columnNames) : bool

Checks if an index begins in the order of the given columns.

method Doctrine\DBAL\Schema\Table::addColumn ($columnName, $typeName, $options = []) : Doctrine\DBAL\Schema\Column

method Doctrine\DBAL\Schema\Table::renameColumn ($oldColumnName, $newColumnName) : void

Renames a Column.

method Doctrine\DBAL\Schema\Table::changeColumn ($columnName, $options) : Doctrine\DBAL\Schema\Table

Change Column Details.

method Doctrine\DBAL\Schema\Table::dropColumn ($columnName) : Doctrine\DBAL\Schema\Table

Drops a Column from the Table.

method Doctrine\DBAL\Schema\Table::addForeignKeyConstraint ($foreignTable, $localColumnNames, $foreignColumnNames, $options = [], $constraintName = null) : Doctrine\DBAL\Schema\Table

Adds a foreign key constraint.

Name is inferred from the local columns.

method Doctrine\DBAL\Schema\Table::addUnnamedForeignKeyConstraint ($foreignTable, $localColumnNames, $foreignColumnNames, $options = []) : Doctrine\DBAL\Schema\Table

Adds a foreign key constraint.

Name is to be generated by the database itself.

method Doctrine\DBAL\Schema\Table::addNamedForeignKeyConstraint ($name, $foreignTable, $localColumnNames, $foreignColumnNames, $options = []) : Doctrine\DBAL\Schema\Table

Adds a foreign key constraint with a given name.

method Doctrine\DBAL\Schema\Table::addOption ($name, $value) : Doctrine\DBAL\Schema\Table

method Doctrine\DBAL\Schema\Table::_addColumn ($column) : void

method Doctrine\DBAL\Schema\Table::_addIndex ($indexCandidate) : Doctrine\DBAL\Schema\Table

Adds an index to the table.

method Doctrine\DBAL\Schema\Table::_addForeignKeyConstraint ($constraint) : void

method Doctrine\DBAL\Schema\Table::hasForeignKey ($constraintName) : bool

Returns whether this table has a foreign key constraint with the given name.

method Doctrine\DBAL\Schema\Table::getForeignKey ($constraintName) : Doctrine\DBAL\Schema\ForeignKeyConstraint

Returns the foreign key constraint with the given name.

method Doctrine\DBAL\Schema\Table::removeForeignKey ($constraintName) : void

Removes the foreign key constraint with the given name.

method Doctrine\DBAL\Schema\Table::getColumns () : Doctrine\DBAL\Schema\Column[]

Returns ordered list of columns (primary keys are first, then foreign keys, then the rest)

method Doctrine\DBAL\Schema\Table::hasColumn ($columnName) : bool

Returns whether this table has a Column with the given name.

method Doctrine\DBAL\Schema\Table::getColumn ($columnName) : Doctrine\DBAL\Schema\Column

Returns the Column with the given name.

method Doctrine\DBAL\Schema\Table::getPrimaryKey () : Doctrine\DBAL\Schema\Indexnull

Returns the primary key.

method Doctrine\DBAL\Schema\Table::getPrimaryKeyColumns () : string[]

Returns the primary key columns.

method Doctrine\DBAL\Schema\Table::hasPrimaryKey () : bool

Returns whether this table has a primary key.

method Doctrine\DBAL\Schema\Table::hasIndex ($indexName) : bool

Returns whether this table has an Index with the given name.

method Doctrine\DBAL\Schema\Table::getIndex ($indexName) : Doctrine\DBAL\Schema\Index

Returns the Index with the given name.

method Doctrine\DBAL\Schema\Table::getIndexes () : Doctrine\DBAL\Schema\Index[]

method Doctrine\DBAL\Schema\Table::getForeignKeys () : Doctrine\DBAL\Schema\ForeignKeyConstraint[]

Returns the foreign key constraints.

method Doctrine\DBAL\Schema\Table::hasOption ($name) : bool

method Doctrine\DBAL\Schema\Table::getOption ($name) : mixed

method Doctrine\DBAL\Schema\Table::getOptions () : mixed[]

method Doctrine\DBAL\Schema\Table::visit ($visitor) : void

method Doctrine\DBAL\Schema\Table::__clone () : void

Clone of a Table triggers a deep clone of all affected assets.

method Doctrine\DBAL\Schema\Table::setComment ($comment) : Doctrine\DBAL\Schema\Table

method Doctrine\DBAL\Schema\Table::getComment () : string

method Doctrine\DBAL\Schema\Table::_setName ($name) : void

Sets the name of this asset.

method Doctrine\DBAL\Schema\Table::isInDefaultNamespace ($defaultNamespaceName) : bool

Is this asset in the default namespace?

method Doctrine\DBAL\Schema\Table::getNamespaceName () : stringnull

Gets the namespace name of this asset.

If NULL is returned this means the default namespace is used.

method Doctrine\DBAL\Schema\Table::getShortestName ($defaultNamespaceName) : string

The shortest name is stripped of the default namespace. All other
namespaced elements are returned as full-qualified names.

method Doctrine\DBAL\Schema\Table::getFullQualifiedName ($defaultNamespaceName) : string

The normalized name is full-qualified and lowerspaced. Lowerspacing is
actually wrong, but we have to do it to keep our sanity. If you are
using database objects that only differentiate in the casing (FOO vs
Foo) then you will NOT be able to use Doctrine Schema abstraction.

Every non-namespaced element is prefixed with the default namespace
name which is passed as argument to this method.

method Doctrine\DBAL\Schema\Table::isQuoted () : bool

Checks if this asset's name is quoted.

method Doctrine\DBAL\Schema\Table::isIdentifierQuoted ($identifier) : bool

Checks if this identifier is quoted.

method Doctrine\DBAL\Schema\Table::trimQuotes ($identifier) : string

Trim quotes from the identifier.

method Doctrine\DBAL\Schema\Table::getName () : string

Returns the name of this schema asset.

method Doctrine\DBAL\Schema\Table::getQuotedName ($platform) : string

Gets the quoted representation of this asset but only if it was defined with one. Otherwise
return the plain unquoted value as inserted.

method Doctrine\DBAL\Schema\Table::_generateIdentifierName ($columnNames, $prefix = "", $maxSize = 30) : string

Generates an identifier from a list of column names obeying a certain string length.

This is especially important for Oracle, since it does not allow identifiers larger than 30 chars,
however building idents automatically for foreign keys, composite keys or such can easily create
very long names.

class Doctrine\DBAL\Schema::ForeignKeyConstraint

An abstraction class for a foreign key constraint.

property Doctrine\DBAL\Schema\Table Doctrine\DBAL\Schema\ForeignKeyConstraint::_localTable

Instance of the referencing table the foreign key constraint is associated with.

property Doctrine\DBAL\Schema\Identifier[] Doctrine\DBAL\Schema\ForeignKeyConstraint::_localColumnNames

Asset identifier instances of the referencing table column names the foreign key constraint is associated with.
array($columnName => Identifier)

property Doctrine\DBAL\Schema\TableDoctrine\DBAL\Schema\Identifier Doctrine\DBAL\Schema\ForeignKeyConstraint::_foreignTableName

Table or asset identifier instance of the referenced table name the foreign key constraint is associated with.

property Doctrine\DBAL\Schema\Identifier[] Doctrine\DBAL\Schema\ForeignKeyConstraint::_foreignColumnNames

Asset identifier instances of the referenced table column names the foreign key constraint is associated with.
array($columnName => Identifier)

property mixed[] Doctrine\DBAL\Schema\ForeignKeyConstraint::_options

Options associated with the foreign key constraint.

property string Doctrine\DBAL\Schema\ForeignKeyConstraint::_name

property stringnull Doctrine\DBAL\Schema\ForeignKeyConstraint::_namespace

Namespace of the asset. If none isset the default namespace is assumed.

property bool Doctrine\DBAL\Schema\ForeignKeyConstraint::_quoted

method Doctrine\DBAL\Schema\ForeignKeyConstraint::__construct ($localColumnNames, $foreignTableName, $foreignColumnNames, $name = null, $options = []) : void

Initializes the foreign key constraint.

method Doctrine\DBAL\Schema\ForeignKeyConstraint::getLocalTableName () : string

Returns the name of the referencing table
the foreign key constraint is associated with.

method Doctrine\DBAL\Schema\ForeignKeyConstraint::setLocalTable ($table) : void

Sets the Table instance of the referencing table
the foreign key constraint is associated with.

method Doctrine\DBAL\Schema\ForeignKeyConstraint::getLocalTable () : Doctrine\DBAL\Schema\Table

method Doctrine\DBAL\Schema\ForeignKeyConstraint::getLocalColumns () : string[]

Returns the names of the referencing table columns
the foreign key constraint is associated with.

method Doctrine\DBAL\Schema\ForeignKeyConstraint::getQuotedLocalColumns ($platform) : string[]

Returns the quoted representation of the referencing table column names
the foreign key constraint is associated with.

But only if they were defined with one or the referencing table column name
is a keyword reserved by the platform.
Otherwise the plain unquoted value as inserted is returned.

method Doctrine\DBAL\Schema\ForeignKeyConstraint::getUnquotedLocalColumns () : string[]

Returns unquoted representation of local table column names for comparison with other FK

method Doctrine\DBAL\Schema\ForeignKeyConstraint::getUnquotedForeignColumns () : string[]

Returns unquoted representation of foreign table column names for comparison with other FK

method Doctrine\DBAL\Schema\ForeignKeyConstraint::getColumns () : string[]

Returns the names of the referencing table columns
the constraint is associated with.

method Doctrine\DBAL\Schema\ForeignKeyConstraint::getQuotedColumns ($platform) : string[]

Returns the quoted representation of the referencing table column names
the foreign key constraint is associated with.

But only if they were defined with one or the referencing table column name
is a keyword reserved by the platform.
Otherwise the plain unquoted value as inserted is returned.

method Doctrine\DBAL\Schema\ForeignKeyConstraint::getForeignTableName () : string

Returns the name of the referenced table
the foreign key constraint is associated with.

method Doctrine\DBAL\Schema\ForeignKeyConstraint::getUnqualifiedForeignTableName () : string

Returns the non-schema qualified foreign table name.

method Doctrine\DBAL\Schema\ForeignKeyConstraint::getQuotedForeignTableName ($platform) : string

Returns the quoted representation of the referenced table name
the foreign key constraint is associated with.

But only if it was defined with one or the referenced table name
is a keyword reserved by the platform.
Otherwise the plain unquoted value as inserted is returned.

method Doctrine\DBAL\Schema\ForeignKeyConstraint::getForeignColumns () : string[]

Returns the names of the referenced table columns
the foreign key constraint is associated with.

method Doctrine\DBAL\Schema\ForeignKeyConstraint::getQuotedForeignColumns ($platform) : string[]

Returns the quoted representation of the referenced table column names
the foreign key constraint is associated with.

But only if they were defined with one or the referenced table column name
is a keyword reserved by the platform.
Otherwise the plain unquoted value as inserted is returned.

method Doctrine\DBAL\Schema\ForeignKeyConstraint::hasOption ($name) : bool

Returns whether or not a given option
is associated with the foreign key constraint.

method Doctrine\DBAL\Schema\ForeignKeyConstraint::getOption ($name) : mixed

Returns an option associated with the foreign key constraint.

method Doctrine\DBAL\Schema\ForeignKeyConstraint::getOptions () : mixed[]

Returns the options associated with the foreign key constraint.

method Doctrine\DBAL\Schema\ForeignKeyConstraint::onUpdate () : stringnull

Returns the referential action for UPDATE operations
on the referenced table the foreign key constraint is associated with.

method Doctrine\DBAL\Schema\ForeignKeyConstraint::onDelete () : stringnull

Returns the referential action for DELETE operations
on the referenced table the foreign key constraint is associated with.

method Doctrine\DBAL\Schema\ForeignKeyConstraint::intersectsIndexColumns ($index) : bool

Checks whether this foreign key constraint intersects the given index columns.

Returns true if at least one of this foreign key's local columns
matches one of the given index's columns, false otherwise.

method Doctrine\DBAL\Schema\ForeignKeyConstraint::_setName ($name) : void

Sets the name of this asset.

method Doctrine\DBAL\Schema\ForeignKeyConstraint::isInDefaultNamespace ($defaultNamespaceName) : bool

Is this asset in the default namespace?

method Doctrine\DBAL\Schema\ForeignKeyConstraint::getNamespaceName () : stringnull

Gets the namespace name of this asset.

If NULL is returned this means the default namespace is used.

method Doctrine\DBAL\Schema\ForeignKeyConstraint::getShortestName ($defaultNamespaceName) : string

The shortest name is stripped of the default namespace. All other
namespaced elements are returned as full-qualified names.

method Doctrine\DBAL\Schema\ForeignKeyConstraint::getFullQualifiedName ($defaultNamespaceName) : string

The normalized name is full-qualified and lowerspaced. Lowerspacing is
actually wrong, but we have to do it to keep our sanity. If you are
using database objects that only differentiate in the casing (FOO vs
Foo) then you will NOT be able to use Doctrine Schema abstraction.

Every non-namespaced element is prefixed with the default namespace
name which is passed as argument to this method.

method Doctrine\DBAL\Schema\ForeignKeyConstraint::isQuoted () : bool

Checks if this asset's name is quoted.

method Doctrine\DBAL\Schema\ForeignKeyConstraint::isIdentifierQuoted ($identifier) : bool

Checks if this identifier is quoted.

method Doctrine\DBAL\Schema\ForeignKeyConstraint::trimQuotes ($identifier) : string

Trim quotes from the identifier.

method Doctrine\DBAL\Schema\ForeignKeyConstraint::getName () : string

Returns the name of this schema asset.

method Doctrine\DBAL\Schema\ForeignKeyConstraint::getQuotedName ($platform) : string

Gets the quoted representation of this asset but only if it was defined with one. Otherwise
return the plain unquoted value as inserted.

method Doctrine\DBAL\Schema\ForeignKeyConstraint::_generateIdentifierName ($columnNames, $prefix = "", $maxSize = 30) : string

Generates an identifier from a list of column names obeying a certain string length.

This is especially important for Oracle, since it does not allow identifiers larger than 30 chars,
however building idents automatically for foreign keys, composite keys or such can easily create
very long names.

class Doctrine\DBAL\Schema::Index

property Doctrine\DBAL\Schema\Identifier[] Doctrine\DBAL\Schema\Index::_columns

Asset identifier instances of the column names the index is associated with.
array($columnName => Identifier)

property bool Doctrine\DBAL\Schema\Index::_isUnique

property bool Doctrine\DBAL\Schema\Index::_isPrimary

property true[] Doctrine\DBAL\Schema\Index::_flags

Platform specific flags for indexes.
array($flagName => true)

property string Doctrine\DBAL\Schema\Index::_name

property stringnull Doctrine\DBAL\Schema\Index::_namespace

Namespace of the asset. If none isset the default namespace is assumed.

property bool Doctrine\DBAL\Schema\Index::_quoted

method Doctrine\DBAL\Schema\Index::__construct ($indexName, $columns, $isUnique = false, $isPrimary = false, $flags = [], $options = []) : void

method Doctrine\DBAL\Schema\Index::_addColumn ($column) : void

method Doctrine\DBAL\Schema\Index::getColumns () : string[]

Returns the names of the referencing table columns
the constraint is associated with.

method Doctrine\DBAL\Schema\Index::getQuotedColumns ($platform) : string[]

Returns the quoted representation of the column names
the constraint is associated with.

But only if they were defined with one or a column name
is a keyword reserved by the platform.
Otherwise the plain unquoted value as inserted is returned.

method Doctrine\DBAL\Schema\Index::getUnquotedColumns () : string[]

method Doctrine\DBAL\Schema\Index::isSimpleIndex () : bool

Is the index neither unique nor primary key?

method Doctrine\DBAL\Schema\Index::isUnique () : bool

method Doctrine\DBAL\Schema\Index::isPrimary () : bool

method Doctrine\DBAL\Schema\Index::hasColumnAtPosition ($columnName, $pos = 0) : bool

method Doctrine\DBAL\Schema\Index::spansColumns ($columnNames) : bool

Checks if this index exactly spans the given column names in the correct order.

method Doctrine\DBAL\Schema\Index::isFullfilledBy ($other) : bool

Checks if the other index already fulfills all the indexing and constraint needs of the current one.

method Doctrine\DBAL\Schema\Index::overrules ($other) : bool

Detects if the other index is a non-unique, non primary index that can be overwritten by this one.

method Doctrine\DBAL\Schema\Index::getFlags () : string[]

Returns platform specific flags for indexes.

method Doctrine\DBAL\Schema\Index::addFlag ($flag) : Doctrine\DBAL\Schema\Index

Adds Flag for an index that translates to platform specific handling.

method Doctrine\DBAL\Schema\Index::hasFlag ($flag) : bool

Does this index have a specific flag?

method Doctrine\DBAL\Schema\Index::removeFlag ($flag) : void

Removes a flag.

method Doctrine\DBAL\Schema\Index::hasOption ($name) : bool

method Doctrine\DBAL\Schema\Index::getOption ($name) : mixed

method Doctrine\DBAL\Schema\Index::getOptions () : mixed[]

method Doctrine\DBAL\Schema\Index::_setName ($name) : void

Sets the name of this asset.

method Doctrine\DBAL\Schema\Index::isInDefaultNamespace ($defaultNamespaceName) : bool

Is this asset in the default namespace?

method Doctrine\DBAL\Schema\Index::getNamespaceName () : stringnull

Gets the namespace name of this asset.

If NULL is returned this means the default namespace is used.

method Doctrine\DBAL\Schema\Index::getShortestName ($defaultNamespaceName) : string

The shortest name is stripped of the default namespace. All other
namespaced elements are returned as full-qualified names.

method Doctrine\DBAL\Schema\Index::getFullQualifiedName ($defaultNamespaceName) : string

The normalized name is full-qualified and lowerspaced. Lowerspacing is
actually wrong, but we have to do it to keep our sanity. If you are
using database objects that only differentiate in the casing (FOO vs
Foo) then you will NOT be able to use Doctrine Schema abstraction.

Every non-namespaced element is prefixed with the default namespace
name which is passed as argument to this method.

method Doctrine\DBAL\Schema\Index::isQuoted () : bool

Checks if this asset's name is quoted.

method Doctrine\DBAL\Schema\Index::isIdentifierQuoted ($identifier) : bool

Checks if this identifier is quoted.

method Doctrine\DBAL\Schema\Index::trimQuotes ($identifier) : string

Trim quotes from the identifier.

method Doctrine\DBAL\Schema\Index::getName () : string

Returns the name of this schema asset.

method Doctrine\DBAL\Schema\Index::getQuotedName ($platform) : string

Gets the quoted representation of this asset but only if it was defined with one. Otherwise
return the plain unquoted value as inserted.

method Doctrine\DBAL\Schema\Index::_generateIdentifierName ($columnNames, $prefix = "", $maxSize = 30) : string

Generates an identifier from a list of column names obeying a certain string length.

This is especially important for Oracle, since it does not allow identifiers larger than 30 chars,
however building idents automatically for foreign keys, composite keys or such can easily create
very long names.

class Doctrine\DBAL\Schema::Schema

Object representation of a database schema.

Different vendors have very inconsistent naming with regard to the concept
of a "schema". Doctrine understands a schema as the entity that conceptually
wraps a set of database objects such as tables, sequences, indexes and
foreign keys that belong to each other into a namespace. A Doctrine Schema
has nothing to do with the "SCHEMA" defined as in PostgreSQL, it is more
related to the concept of "DATABASE" that exists in MySQL and PostgreSQL.

Every asset in the doctrine schema has a name. A name consists of either a
namespace.local name pair or just a local unqualified name.

The abstraction layer that covers a PostgreSQL schema is the namespace of an
database object (asset). A schema can have a name, which will be used as
default namespace for the unqualified database objects that are created in
the schema.

In the case of MySQL where cross-database queries are allowed this leads to
databases being "misinterpreted" as namespaces. This is intentional, however
the CREATE/DROP SQL visitors will just filter this queries and do not
execute them. Only the queries for the currently connected database are
executed.

property Doctrine\DBAL\Schema\Table[] Doctrine\DBAL\Schema\Schema::_tables

property Doctrine\DBAL\Schema\Sequence[] Doctrine\DBAL\Schema\Schema::_sequences

property Doctrine\DBAL\Schema\SchemaConfig Doctrine\DBAL\Schema\Schema::_schemaConfig

property string Doctrine\DBAL\Schema\Schema::_name

property stringnull Doctrine\DBAL\Schema\Schema::_namespace

Namespace of the asset. If none isset the default namespace is assumed.

property bool Doctrine\DBAL\Schema\Schema::_quoted

method Doctrine\DBAL\Schema\Schema::__construct ($tables = [], $sequences = [], $schemaConfig = null, $namespaces = []) : void

method Doctrine\DBAL\Schema\Schema::hasExplicitForeignKeyIndexes () : bool

method Doctrine\DBAL\Schema\Schema::_addTable ($table) : void

method Doctrine\DBAL\Schema\Schema::_addSequence ($sequence) : void

method Doctrine\DBAL\Schema\Schema::getNamespaces () : string[]

Returns the namespaces of this schema.

method Doctrine\DBAL\Schema\Schema::getTables () : Doctrine\DBAL\Schema\Table[]

Gets all tables of this schema.

method Doctrine\DBAL\Schema\Schema::getTable ($tableName) : Doctrine\DBAL\Schema\Table

method Doctrine\DBAL\Schema\Schema::hasNamespace ($namespaceName) : bool

Does this schema have a namespace with the given name?

method Doctrine\DBAL\Schema\Schema::hasTable ($tableName) : bool

Does this schema have a table with the given name?

method Doctrine\DBAL\Schema\Schema::getTableNames () : string[]

Gets all table names, prefixed with a schema name, even the default one if present.

method Doctrine\DBAL\Schema\Schema::hasSequence ($sequenceName) : bool

method Doctrine\DBAL\Schema\Schema::getSequence ($sequenceName) : Doctrine\DBAL\Schema\Sequence

method Doctrine\DBAL\Schema\Schema::getSequences () : Doctrine\DBAL\Schema\Sequence[]

method Doctrine\DBAL\Schema\Schema::createNamespace ($namespaceName) : Doctrine\DBAL\Schema\Schema

Creates a new namespace.

method Doctrine\DBAL\Schema\Schema::createTable ($tableName) : Doctrine\DBAL\Schema\Table

Creates a new table.

method Doctrine\DBAL\Schema\Schema::renameTable ($oldTableName, $newTableName) : Doctrine\DBAL\Schema\Schema

Renames a table.

method Doctrine\DBAL\Schema\Schema::dropTable ($tableName) : Doctrine\DBAL\Schema\Schema

Drops a table from the schema.

method Doctrine\DBAL\Schema\Schema::createSequence ($sequenceName, $allocationSize = 1, $initialValue = 1) : Doctrine\DBAL\Schema\Sequence

Creates a new sequence.

method Doctrine\DBAL\Schema\Schema::dropSequence ($sequenceName) : Doctrine\DBAL\Schema\Schema

method Doctrine\DBAL\Schema\Schema::toSql ($platform) : string[]

Returns an array of necessary SQL queries to create the schema on the given platform.

method Doctrine\DBAL\Schema\Schema::toDropSql ($platform) : string[]

Return an array of necessary SQL queries to drop the schema on the given platform.

method Doctrine\DBAL\Schema\Schema::getMigrateToSql ($toSchema, $platform) : string[]

method Doctrine\DBAL\Schema\Schema::getMigrateFromSql ($fromSchema, $platform) : string[]

method Doctrine\DBAL\Schema\Schema::visit ($visitor) : void

method Doctrine\DBAL\Schema\Schema::__clone () : void

Cloning a Schema triggers a deep clone of all related assets.

method Doctrine\DBAL\Schema\Schema::_setName ($name) : void

Sets the name of this asset.

method Doctrine\DBAL\Schema\Schema::isInDefaultNamespace ($defaultNamespaceName) : bool

Is this asset in the default namespace?

method Doctrine\DBAL\Schema\Schema::getNamespaceName () : stringnull

Gets the namespace name of this asset.

If NULL is returned this means the default namespace is used.

method Doctrine\DBAL\Schema\Schema::getShortestName ($defaultNamespaceName) : string

The shortest name is stripped of the default namespace. All other
namespaced elements are returned as full-qualified names.

method Doctrine\DBAL\Schema\Schema::getFullQualifiedName ($defaultNamespaceName) : string

The normalized name is full-qualified and lowerspaced. Lowerspacing is
actually wrong, but we have to do it to keep our sanity. If you are
using database objects that only differentiate in the casing (FOO vs
Foo) then you will NOT be able to use Doctrine Schema abstraction.

Every non-namespaced element is prefixed with the default namespace
name which is passed as argument to this method.

method Doctrine\DBAL\Schema\Schema::isQuoted () : bool

Checks if this asset's name is quoted.

method Doctrine\DBAL\Schema\Schema::isIdentifierQuoted ($identifier) : bool

Checks if this identifier is quoted.

method Doctrine\DBAL\Schema\Schema::trimQuotes ($identifier) : string

Trim quotes from the identifier.

method Doctrine\DBAL\Schema\Schema::getName () : string

Returns the name of this schema asset.

method Doctrine\DBAL\Schema\Schema::getQuotedName ($platform) : string

Gets the quoted representation of this asset but only if it was defined with one. Otherwise
return the plain unquoted value as inserted.

method Doctrine\DBAL\Schema\Schema::_generateIdentifierName ($columnNames, $prefix = "", $maxSize = 30) : string

Generates an identifier from a list of column names obeying a certain string length.

This is especially important for Oracle, since it does not allow identifiers larger than 30 chars,
however building idents automatically for foreign keys, composite keys or such can easily create
very long names.

class Doctrine\DBAL\Schema::Sequence

Sequence structure.

property int Doctrine\DBAL\Schema\Sequence::allocationSize

property int Doctrine\DBAL\Schema\Sequence::initialValue

property intnull Doctrine\DBAL\Schema\Sequence::cache

property string Doctrine\DBAL\Schema\Sequence::_name

property stringnull Doctrine\DBAL\Schema\Sequence::_namespace

Namespace of the asset. If none isset the default namespace is assumed.

property bool Doctrine\DBAL\Schema\Sequence::_quoted

method Doctrine\DBAL\Schema\Sequence::__construct ($name, $allocationSize = 1, $initialValue = 1, $cache = null) : void

method Doctrine\DBAL\Schema\Sequence::getAllocationSize () : int

method Doctrine\DBAL\Schema\Sequence::getInitialValue () : int

method Doctrine\DBAL\Schema\Sequence::getCache () : intnull

method Doctrine\DBAL\Schema\Sequence::setAllocationSize ($allocationSize) : Doctrine\DBAL\Schema\Sequence

method Doctrine\DBAL\Schema\Sequence::setInitialValue ($initialValue) : Doctrine\DBAL\Schema\Sequence

method Doctrine\DBAL\Schema\Sequence::setCache ($cache) : Doctrine\DBAL\Schema\Sequence

method Doctrine\DBAL\Schema\Sequence::isAutoIncrementsFor ($table) : bool

Checks if this sequence is an autoincrement sequence for a given table.

This is used inside the comparator to not report sequences as missing,
when the "from" schema implicitly creates the sequences.

method Doctrine\DBAL\Schema\Sequence::visit ($visitor) : void

method Doctrine\DBAL\Schema\Sequence::_setName ($name) : void

Sets the name of this asset.

method Doctrine\DBAL\Schema\Sequence::isInDefaultNamespace ($defaultNamespaceName) : bool

Is this asset in the default namespace?

method Doctrine\DBAL\Schema\Sequence::getNamespaceName () : stringnull

Gets the namespace name of this asset.

If NULL is returned this means the default namespace is used.

method Doctrine\DBAL\Schema\Sequence::getShortestName ($defaultNamespaceName) : string

The shortest name is stripped of the default namespace. All other
namespaced elements are returned as full-qualified names.

method Doctrine\DBAL\Schema\Sequence::getFullQualifiedName ($defaultNamespaceName) : string

The normalized name is full-qualified and lowerspaced. Lowerspacing is
actually wrong, but we have to do it to keep our sanity. If you are
using database objects that only differentiate in the casing (FOO vs
Foo) then you will NOT be able to use Doctrine Schema abstraction.

Every non-namespaced element is prefixed with the default namespace
name which is passed as argument to this method.

method Doctrine\DBAL\Schema\Sequence::isQuoted () : bool

Checks if this asset's name is quoted.

method Doctrine\DBAL\Schema\Sequence::isIdentifierQuoted ($identifier) : bool

Checks if this identifier is quoted.

method Doctrine\DBAL\Schema\Sequence::trimQuotes ($identifier) : string

Trim quotes from the identifier.

method Doctrine\DBAL\Schema\Sequence::getName () : string

Returns the name of this schema asset.

method Doctrine\DBAL\Schema\Sequence::getQuotedName ($platform) : string

Gets the quoted representation of this asset but only if it was defined with one. Otherwise
return the plain unquoted value as inserted.

method Doctrine\DBAL\Schema\Sequence::_generateIdentifierName ($columnNames, $prefix = "", $maxSize = 30) : string

Generates an identifier from a list of column names obeying a certain string length.

This is especially important for Oracle, since it does not allow identifiers larger than 30 chars,
however building idents automatically for foreign keys, composite keys or such can easily create
very long names.

class Doctrine\DBAL\Schema::SchemaException

classconstant integer Doctrine\DBAL\Schema\SchemaException::TABLE_DOESNT_EXIST

classconstant integer Doctrine\DBAL\Schema\SchemaException::TABLE_ALREADY_EXISTS

classconstant integer Doctrine\DBAL\Schema\SchemaException::COLUMN_DOESNT_EXIST

classconstant integer Doctrine\DBAL\Schema\SchemaException::COLUMN_ALREADY_EXISTS

classconstant integer Doctrine\DBAL\Schema\SchemaException::INDEX_DOESNT_EXIST

classconstant integer Doctrine\DBAL\Schema\SchemaException::INDEX_ALREADY_EXISTS

classconstant integer Doctrine\DBAL\Schema\SchemaException::SEQUENCE_DOENST_EXIST

classconstant integer Doctrine\DBAL\Schema\SchemaException::SEQUENCE_ALREADY_EXISTS

classconstant integer Doctrine\DBAL\Schema\SchemaException::INDEX_INVALID_NAME

classconstant integer Doctrine\DBAL\Schema\SchemaException::FOREIGNKEY_DOESNT_EXIST

classconstant integer Doctrine\DBAL\Schema\SchemaException::NAMESPACE_ALREADY_EXISTS

property string Doctrine\DBAL\Schema\SchemaException::message

property integer Doctrine\DBAL\Schema\SchemaException::code

property NULL Doctrine\DBAL\Schema\SchemaException::file

property NULL Doctrine\DBAL\Schema\SchemaException::line

method Doctrine\DBAL\Schema\SchemaException::tableDoesNotExist ($tableName) : Doctrine\DBAL\Schema\SchemaException

method Doctrine\DBAL\Schema\SchemaException::indexNameInvalid ($indexName) : Doctrine\DBAL\Schema\SchemaException

method Doctrine\DBAL\Schema\SchemaException::indexDoesNotExist ($indexName, $table) : Doctrine\DBAL\Schema\SchemaException

method Doctrine\DBAL\Schema\SchemaException::indexAlreadyExists ($indexName, $table) : Doctrine\DBAL\Schema\SchemaException

method Doctrine\DBAL\Schema\SchemaException::columnDoesNotExist ($columnName, $table) : Doctrine\DBAL\Schema\SchemaException

method Doctrine\DBAL\Schema\SchemaException::namespaceAlreadyExists ($namespaceName) : Doctrine\DBAL\Schema\SchemaException

method Doctrine\DBAL\Schema\SchemaException::tableAlreadyExists ($tableName) : Doctrine\DBAL\Schema\SchemaException

method Doctrine\DBAL\Schema\SchemaException::columnAlreadyExists ($tableName, $columnName) : Doctrine\DBAL\Schema\SchemaException

method Doctrine\DBAL\Schema\SchemaException::sequenceAlreadyExists ($sequenceName) : Doctrine\DBAL\Schema\SchemaException

method Doctrine\DBAL\Schema\SchemaException::sequenceDoesNotExist ($sequenceName) : Doctrine\DBAL\Schema\SchemaException

method Doctrine\DBAL\Schema\SchemaException::foreignKeyDoesNotExist ($fkName, $table) : Doctrine\DBAL\Schema\SchemaException

method Doctrine\DBAL\Schema\SchemaException::namedForeignKeyRequired ($localTable, $foreignKey) : Doctrine\DBAL\Schema\SchemaException

method Doctrine\DBAL\Schema\SchemaException::alterTableChangeNotSupported ($changeName) : Doctrine\DBAL\Schema\SchemaException

method Doctrine\DBAL\Schema\SchemaException::notSupported ($method) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Schema\SchemaException::invalidPlatformSpecified () : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Schema\SchemaException::invalidPlatformType ($invalidPlatform) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Schema\SchemaException::invalidPlatformVersionSpecified ($version, $expectedFormat) : Doctrine\DBAL\DBALException

Returns a new instance for an invalid specified platform version.

method Doctrine\DBAL\Schema\SchemaException::invalidPdoInstance () : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Schema\SchemaException::driverRequired ($url = null) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Schema\SchemaException::unknownDriver ($unknownDriverName, $knownDrivers) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Schema\SchemaException::driverExceptionDuringQuery ($driver, $driverEx, $sql, $params = []) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Schema\SchemaException::driverException ($driver, $driverEx) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Schema\SchemaException::invalidWrapperClass ($wrapperClass) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Schema\SchemaException::invalidDriverClass ($driverClass) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Schema\SchemaException::invalidTableName ($tableName) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Schema\SchemaException::noColumnsSpecifiedForTable ($tableName) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Schema\SchemaException::limitOffsetInvalid () : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Schema\SchemaException::typeExists ($name) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Schema\SchemaException::unknownColumnType ($name) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Schema\SchemaException::typeNotFound ($name) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Schema\SchemaException::typeNotRegistered ($type) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Schema\SchemaException::typeAlreadyRegistered ($type) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\Schema\SchemaException::__construct ($message, $code, $previous) : void

method Doctrine\DBAL\Schema\SchemaException::__wakeup () : void

method Doctrine\DBAL\Schema\SchemaException::getMessage () : void

method Doctrine\DBAL\Schema\SchemaException::getCode () : void

method Doctrine\DBAL\Schema\SchemaException::getFile () : void

method Doctrine\DBAL\Schema\SchemaException::getLine () : void

method Doctrine\DBAL\Schema\SchemaException::getTrace () : void

method Doctrine\DBAL\Schema\SchemaException::getPrevious () : void

method Doctrine\DBAL\Schema\SchemaException::getTraceAsString () : void

method Doctrine\DBAL\Schema\SchemaException::__toString () : void

class Doctrine\DBAL\Schema::Identifier

An abstraction class for an asset identifier.

Wraps identifier names like column names in indexes / foreign keys
in an abstract class for proper quotation capabilities.

property string Doctrine\DBAL\Schema\Identifier::_name

property stringnull Doctrine\DBAL\Schema\Identifier::_namespace

Namespace of the asset. If none isset the default namespace is assumed.

property bool Doctrine\DBAL\Schema\Identifier::_quoted

method Doctrine\DBAL\Schema\Identifier::__construct ($identifier, $quote = false) : void

method Doctrine\DBAL\Schema\Identifier::_setName ($name) : void

Sets the name of this asset.

method Doctrine\DBAL\Schema\Identifier::isInDefaultNamespace ($defaultNamespaceName) : bool

Is this asset in the default namespace?

method Doctrine\DBAL\Schema\Identifier::getNamespaceName () : stringnull

Gets the namespace name of this asset.

If NULL is returned this means the default namespace is used.

method Doctrine\DBAL\Schema\Identifier::getShortestName ($defaultNamespaceName) : string

The shortest name is stripped of the default namespace. All other
namespaced elements are returned as full-qualified names.

method Doctrine\DBAL\Schema\Identifier::getFullQualifiedName ($defaultNamespaceName) : string

The normalized name is full-qualified and lowerspaced. Lowerspacing is
actually wrong, but we have to do it to keep our sanity. If you are
using database objects that only differentiate in the casing (FOO vs
Foo) then you will NOT be able to use Doctrine Schema abstraction.

Every non-namespaced element is prefixed with the default namespace
name which is passed as argument to this method.

method Doctrine\DBAL\Schema\Identifier::isQuoted () : bool

Checks if this asset's name is quoted.

method Doctrine\DBAL\Schema\Identifier::isIdentifierQuoted ($identifier) : bool

Checks if this identifier is quoted.

method Doctrine\DBAL\Schema\Identifier::trimQuotes ($identifier) : string

Trim quotes from the identifier.

method Doctrine\DBAL\Schema\Identifier::getName () : string

Returns the name of this schema asset.

method Doctrine\DBAL\Schema\Identifier::getQuotedName ($platform) : string

Gets the quoted representation of this asset but only if it was defined with one. Otherwise
return the plain unquoted value as inserted.

method Doctrine\DBAL\Schema\Identifier::_generateIdentifierName ($columnNames, $prefix = "", $maxSize = 30) : string

Generates an identifier from a list of column names obeying a certain string length.

This is especially important for Oracle, since it does not allow identifiers larger than 30 chars,
however building idents automatically for foreign keys, composite keys or such can easily create
very long names.

class Doctrine\DBAL\Schema::AbstractSchemaManager

Base class for schema managers. Schema managers are used to inspect and/or
modify the database schema/structure.

property Doctrine\DBAL\Connection Doctrine\DBAL\Schema\AbstractSchemaManager::_conn

Holds instance of the Doctrine connection for this schema manager.

property Doctrine\DBAL\Platforms\AbstractPlatform Doctrine\DBAL\Schema\AbstractSchemaManager::_platform

Holds instance of the database platform used for this schema manager.

method Doctrine\DBAL\Schema\AbstractSchemaManager::__construct ($conn, $platform = null) : void

Constructor. Accepts the Connection instance to manage the schema for.

method Doctrine\DBAL\Schema\AbstractSchemaManager::getDatabasePlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

Returns the associated platform.

method Doctrine\DBAL\Schema\AbstractSchemaManager::tryMethod () : mixed

Tries any method on the schema manager. Normally a method throws an
exception when your DBMS doesn't support it or if an error occurs.
This method allows you to try and method on your SchemaManager
instance and will return false if it does not work or is not supported.


$result = $sm->tryMethod('dropView', 'view_name');

method Doctrine\DBAL\Schema\AbstractSchemaManager::listDatabases () : string[]

Lists the available databases for this connection.

method Doctrine\DBAL\Schema\AbstractSchemaManager::listNamespaceNames () : string[]

Returns a list of all namespaces in the current database.

method Doctrine\DBAL\Schema\AbstractSchemaManager::listSequences ($database = null) : Doctrine\DBAL\Schema\Sequence[]

Lists the available sequences for this connection.

method Doctrine\DBAL\Schema\AbstractSchemaManager::listTableColumns ($table, $database = null) : Doctrine\DBAL\Schema\Column[]

Lists the columns for a given table.

In contrast to other libraries and to the old version of Doctrine,
this column definition does try to contain the 'primary' field for
the reason that it is not portable across different RDBMS. Use
listTableIndexes($tableName) to retrieve the primary key
of a table. Where a RDBMS specifies more details, these are held
in the platformDetails array.

method Doctrine\DBAL\Schema\AbstractSchemaManager::listTableIndexes ($table) : Doctrine\DBAL\Schema\Index[]

Lists the indexes for a given table returning an array of Index instances.

Keys of the portable indexes list are all lower-cased.

method Doctrine\DBAL\Schema\AbstractSchemaManager::tablesExist ($tableNames) : bool

Returns true if all the given tables exist.

The usage of a string $tableNames is deprecated. Pass a one-element array instead.

method Doctrine\DBAL\Schema\AbstractSchemaManager::listTableNames () : string[]

Returns a list of all tables in the current database.

method Doctrine\DBAL\Schema\AbstractSchemaManager::filterAssetNames ($assetNames) : mixed[]

Filters asset names if they are configured to return only a subset of all
the found elements.

method Doctrine\DBAL\Schema\AbstractSchemaManager::getFilterSchemaAssetsExpression () : stringnull

method Doctrine\DBAL\Schema\AbstractSchemaManager::listTables () : Doctrine\DBAL\Schema\Table[]

Lists the tables for this connection.

method Doctrine\DBAL\Schema\AbstractSchemaManager::listTableDetails ($tableName) : Doctrine\DBAL\Schema\Table

method Doctrine\DBAL\Schema\AbstractSchemaManager::listViews () : Doctrine\DBAL\Schema\View[]

Lists the views this connection has.

method Doctrine\DBAL\Schema\AbstractSchemaManager::listTableForeignKeys ($table, $database = null) : Doctrine\DBAL\Schema\ForeignKeyConstraint[]

Lists the foreign keys for the given table.

method Doctrine\DBAL\Schema\AbstractSchemaManager::dropDatabase ($database) : void

Drops a database.

NOTE: You can not drop the database this SchemaManager is currently connected to.

method Doctrine\DBAL\Schema\AbstractSchemaManager::dropTable ($tableName) : void

Drops the given table.

method Doctrine\DBAL\Schema\AbstractSchemaManager::dropIndex ($index, $table) : void

Drops the index from the given table.

method Doctrine\DBAL\Schema\AbstractSchemaManager::dropConstraint ($constraint, $table) : void

Drops the constraint from the given table.

method Doctrine\DBAL\Schema\AbstractSchemaManager::dropForeignKey ($foreignKey, $table) : void

Drops a foreign key from a table.

method Doctrine\DBAL\Schema\AbstractSchemaManager::dropSequence ($name) : void

Drops a sequence with a given name.

method Doctrine\DBAL\Schema\AbstractSchemaManager::dropView ($name) : void

Drops a view.

method Doctrine\DBAL\Schema\AbstractSchemaManager::createDatabase ($database) : void

Creates a new database.

method Doctrine\DBAL\Schema\AbstractSchemaManager::createTable ($table) : void

Creates a new table.

method Doctrine\DBAL\Schema\AbstractSchemaManager::createSequence ($sequence) : void

Creates a new sequence.

method Doctrine\DBAL\Schema\AbstractSchemaManager::createConstraint ($constraint, $table) : void

Creates a constraint on a table.

method Doctrine\DBAL\Schema\AbstractSchemaManager::createIndex ($index, $table) : void

Creates a new index on a table.

method Doctrine\DBAL\Schema\AbstractSchemaManager::createForeignKey ($foreignKey, $table) : void

Creates a new foreign key.

method Doctrine\DBAL\Schema\AbstractSchemaManager::createView ($view) : void

Creates a new view.

method Doctrine\DBAL\Schema\AbstractSchemaManager::dropAndCreateConstraint ($constraint, $table) : void

Drops and creates a constraint.

method Doctrine\DBAL\Schema\AbstractSchemaManager::dropAndCreateIndex ($index, $table) : void

Drops and creates a new index on a table.

method Doctrine\DBAL\Schema\AbstractSchemaManager::dropAndCreateForeignKey ($foreignKey, $table) : void

Drops and creates a new foreign key.

method Doctrine\DBAL\Schema\AbstractSchemaManager::dropAndCreateSequence ($sequence) : void

Drops and create a new sequence.

method Doctrine\DBAL\Schema\AbstractSchemaManager::dropAndCreateTable ($table) : void

Drops and creates a new table.

method Doctrine\DBAL\Schema\AbstractSchemaManager::dropAndCreateDatabase ($database) : void

Drops and creates a new database.

method Doctrine\DBAL\Schema\AbstractSchemaManager::dropAndCreateView ($view) : void

Drops and creates a new view.

method Doctrine\DBAL\Schema\AbstractSchemaManager::alterTable ($tableDiff) : void

Alters an existing tables schema.

method Doctrine\DBAL\Schema\AbstractSchemaManager::renameTable ($name, $newName) : void

Renames a given table to another name.

method Doctrine\DBAL\Schema\AbstractSchemaManager::_getPortableDatabasesList ($databases) : string[]

method Doctrine\DBAL\Schema\AbstractSchemaManager::getPortableNamespacesList ($namespaces) : string[]

Converts a list of namespace names from the native DBMS data definition to a portable Doctrine definition.

method Doctrine\DBAL\Schema\AbstractSchemaManager::_getPortableDatabaseDefinition ($database) : mixed

method Doctrine\DBAL\Schema\AbstractSchemaManager::getPortableNamespaceDefinition ($namespace) : mixed

Converts a namespace definition from the native DBMS data definition to a portable Doctrine definition.

method Doctrine\DBAL\Schema\AbstractSchemaManager::_getPortableFunctionsList ($functions) : mixed[][]

method Doctrine\DBAL\Schema\AbstractSchemaManager::_getPortableFunctionDefinition ($function) : mixed

method Doctrine\DBAL\Schema\AbstractSchemaManager::_getPortableTriggersList ($triggers) : mixed[][]

method Doctrine\DBAL\Schema\AbstractSchemaManager::_getPortableTriggerDefinition ($trigger) : mixed

method Doctrine\DBAL\Schema\AbstractSchemaManager::_getPortableSequencesList ($sequences) : Doctrine\DBAL\Schema\Sequence[]

method Doctrine\DBAL\Schema\AbstractSchemaManager::_getPortableSequenceDefinition ($sequence) : Doctrine\DBAL\Schema\Sequence

method Doctrine\DBAL\Schema\AbstractSchemaManager::_getPortableTableColumnList ($table, $database, $tableColumns) : Doctrine\DBAL\Schema\Column[]

Independent of the database the keys of the column list result are lowercased.

The name of the created column instance however is kept in its case.

method Doctrine\DBAL\Schema\AbstractSchemaManager::_getPortableTableColumnDefinition ($tableColumn) : Doctrine\DBAL\Schema\Column

Gets Table Column Definition.

method Doctrine\DBAL\Schema\AbstractSchemaManager::_getPortableTableIndexesList ($tableIndexRows, $tableName = null) : Doctrine\DBAL\Schema\Index[]

Aggregates and groups the index results according to the required data result.

method Doctrine\DBAL\Schema\AbstractSchemaManager::_getPortableTablesList ($tables) : string[]

method Doctrine\DBAL\Schema\AbstractSchemaManager::_getPortableTableDefinition ($table) : string

method Doctrine\DBAL\Schema\AbstractSchemaManager::_getPortableUsersList ($users) : string[][]

method Doctrine\DBAL\Schema\AbstractSchemaManager::_getPortableUserDefinition ($user) : string[]

method Doctrine\DBAL\Schema\AbstractSchemaManager::_getPortableViewsList ($views) : Doctrine\DBAL\Schema\View[]

method Doctrine\DBAL\Schema\AbstractSchemaManager::_getPortableViewDefinition ($view) : Doctrine\DBAL\Schema\Viewfalse

method Doctrine\DBAL\Schema\AbstractSchemaManager::_getPortableTableForeignKeysList ($tableForeignKeys) : Doctrine\DBAL\Schema\ForeignKeyConstraint[]

method Doctrine\DBAL\Schema\AbstractSchemaManager::_getPortableTableForeignKeyDefinition ($tableForeignKey) : Doctrine\DBAL\Schema\ForeignKeyConstraint

method Doctrine\DBAL\Schema\AbstractSchemaManager::_execSql ($sql) : void

method Doctrine\DBAL\Schema\AbstractSchemaManager::createSchema () : Doctrine\DBAL\Schema\Schema

Creates a schema instance for the current database.

method Doctrine\DBAL\Schema\AbstractSchemaManager::createSchemaConfig () : Doctrine\DBAL\Schema\SchemaConfig

Creates the configuration for this schema.

method Doctrine\DBAL\Schema\AbstractSchemaManager::getSchemaSearchPaths () : string[]

The search path for namespaces in the currently connected database.

The first entry is usually the default namespace in the Schema. All
further namespaces contain tables/sequences which can also be addressed
with a short, not full-qualified name.

For databases that don't support subschema/namespaces this method
returns the name of the currently connected database.

method Doctrine\DBAL\Schema\AbstractSchemaManager::extractDoctrineTypeFromComment ($comment, $currentType) : string

Given a table comment this method tries to extract a typehint for Doctrine Type, or returns
the type given as default.

method Doctrine\DBAL\Schema\AbstractSchemaManager::removeDoctrineTypeFromComment ($comment, $type) : stringnull

class Doctrine\DBAL\Schema::DrizzleSchemaManager

Schema manager for the Drizzle RDBMS.

property Doctrine\DBAL\Connection Doctrine\DBAL\Schema\DrizzleSchemaManager::_conn

Holds instance of the Doctrine connection for this schema manager.

property Doctrine\DBAL\Platforms\AbstractPlatform Doctrine\DBAL\Schema\DrizzleSchemaManager::_platform

Holds instance of the database platform used for this schema manager.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::_getPortableTableColumnDefinition ($tableColumn) : Doctrine\DBAL\Schema\Column

Gets Table Column Definition.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::_getPortableDatabaseDefinition ($database) : mixed

method Doctrine\DBAL\Schema\DrizzleSchemaManager::_getPortableTableDefinition ($table) : string

method Doctrine\DBAL\Schema\DrizzleSchemaManager::_getPortableTableForeignKeyDefinition ($tableForeignKey) : Doctrine\DBAL\Schema\ForeignKeyConstraint

method Doctrine\DBAL\Schema\DrizzleSchemaManager::_getPortableTableIndexesList ($tableIndexes, $tableName = null) : Doctrine\DBAL\Schema\Index[]

Aggregates and groups the index results according to the required data result.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::__construct ($conn, $platform = null) : void

Constructor. Accepts the Connection instance to manage the schema for.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::getDatabasePlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

Returns the associated platform.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::tryMethod () : mixed

Tries any method on the schema manager. Normally a method throws an
exception when your DBMS doesn't support it or if an error occurs.
This method allows you to try and method on your SchemaManager
instance and will return false if it does not work or is not supported.


$result = $sm->tryMethod('dropView', 'view_name');

method Doctrine\DBAL\Schema\DrizzleSchemaManager::listDatabases () : string[]

Lists the available databases for this connection.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::listNamespaceNames () : string[]

Returns a list of all namespaces in the current database.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::listSequences ($database = null) : Doctrine\DBAL\Schema\Sequence[]

Lists the available sequences for this connection.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::listTableColumns ($table, $database = null) : Doctrine\DBAL\Schema\Column[]

Lists the columns for a given table.

In contrast to other libraries and to the old version of Doctrine,
this column definition does try to contain the 'primary' field for
the reason that it is not portable across different RDBMS. Use
listTableIndexes($tableName) to retrieve the primary key
of a table. Where a RDBMS specifies more details, these are held
in the platformDetails array.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::listTableIndexes ($table) : Doctrine\DBAL\Schema\Index[]

Lists the indexes for a given table returning an array of Index instances.

Keys of the portable indexes list are all lower-cased.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::tablesExist ($tableNames) : bool

Returns true if all the given tables exist.

The usage of a string $tableNames is deprecated. Pass a one-element array instead.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::listTableNames () : string[]

Returns a list of all tables in the current database.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::filterAssetNames ($assetNames) : mixed[]

Filters asset names if they are configured to return only a subset of all
the found elements.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::getFilterSchemaAssetsExpression () : stringnull

method Doctrine\DBAL\Schema\DrizzleSchemaManager::listTables () : Doctrine\DBAL\Schema\Table[]

Lists the tables for this connection.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::listTableDetails ($tableName) : Doctrine\DBAL\Schema\Table

method Doctrine\DBAL\Schema\DrizzleSchemaManager::listViews () : Doctrine\DBAL\Schema\View[]

Lists the views this connection has.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::listTableForeignKeys ($table, $database = null) : Doctrine\DBAL\Schema\ForeignKeyConstraint[]

Lists the foreign keys for the given table.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::dropDatabase ($database) : void

Drops a database.

NOTE: You can not drop the database this SchemaManager is currently connected to.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::dropTable ($tableName) : void

Drops the given table.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::dropIndex ($index, $table) : void

Drops the index from the given table.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::dropConstraint ($constraint, $table) : void

Drops the constraint from the given table.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::dropForeignKey ($foreignKey, $table) : void

Drops a foreign key from a table.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::dropSequence ($name) : void

Drops a sequence with a given name.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::dropView ($name) : void

Drops a view.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::createDatabase ($database) : void

Creates a new database.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::createTable ($table) : void

Creates a new table.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::createSequence ($sequence) : void

Creates a new sequence.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::createConstraint ($constraint, $table) : void

Creates a constraint on a table.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::createIndex ($index, $table) : void

Creates a new index on a table.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::createForeignKey ($foreignKey, $table) : void

Creates a new foreign key.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::createView ($view) : void

Creates a new view.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::dropAndCreateConstraint ($constraint, $table) : void

Drops and creates a constraint.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::dropAndCreateIndex ($index, $table) : void

Drops and creates a new index on a table.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::dropAndCreateForeignKey ($foreignKey, $table) : void

Drops and creates a new foreign key.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::dropAndCreateSequence ($sequence) : void

Drops and create a new sequence.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::dropAndCreateTable ($table) : void

Drops and creates a new table.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::dropAndCreateDatabase ($database) : void

Drops and creates a new database.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::dropAndCreateView ($view) : void

Drops and creates a new view.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::alterTable ($tableDiff) : void

Alters an existing tables schema.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::renameTable ($name, $newName) : void

Renames a given table to another name.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::_getPortableDatabasesList ($databases) : string[]

method Doctrine\DBAL\Schema\DrizzleSchemaManager::getPortableNamespacesList ($namespaces) : string[]

Converts a list of namespace names from the native DBMS data definition to a portable Doctrine definition.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::getPortableNamespaceDefinition ($namespace) : mixed

Converts a namespace definition from the native DBMS data definition to a portable Doctrine definition.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::_getPortableFunctionsList ($functions) : mixed[][]

method Doctrine\DBAL\Schema\DrizzleSchemaManager::_getPortableFunctionDefinition ($function) : mixed

method Doctrine\DBAL\Schema\DrizzleSchemaManager::_getPortableTriggersList ($triggers) : mixed[][]

method Doctrine\DBAL\Schema\DrizzleSchemaManager::_getPortableTriggerDefinition ($trigger) : mixed

method Doctrine\DBAL\Schema\DrizzleSchemaManager::_getPortableSequencesList ($sequences) : Doctrine\DBAL\Schema\Sequence[]

method Doctrine\DBAL\Schema\DrizzleSchemaManager::_getPortableSequenceDefinition ($sequence) : Doctrine\DBAL\Schema\Sequence

method Doctrine\DBAL\Schema\DrizzleSchemaManager::_getPortableTableColumnList ($table, $database, $tableColumns) : Doctrine\DBAL\Schema\Column[]

Independent of the database the keys of the column list result are lowercased.

The name of the created column instance however is kept in its case.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::_getPortableTablesList ($tables) : string[]

method Doctrine\DBAL\Schema\DrizzleSchemaManager::_getPortableUsersList ($users) : string[][]

method Doctrine\DBAL\Schema\DrizzleSchemaManager::_getPortableUserDefinition ($user) : string[]

method Doctrine\DBAL\Schema\DrizzleSchemaManager::_getPortableViewsList ($views) : Doctrine\DBAL\Schema\View[]

method Doctrine\DBAL\Schema\DrizzleSchemaManager::_getPortableViewDefinition ($view) : Doctrine\DBAL\Schema\Viewfalse

method Doctrine\DBAL\Schema\DrizzleSchemaManager::_getPortableTableForeignKeysList ($tableForeignKeys) : Doctrine\DBAL\Schema\ForeignKeyConstraint[]

method Doctrine\DBAL\Schema\DrizzleSchemaManager::_execSql ($sql) : void

method Doctrine\DBAL\Schema\DrizzleSchemaManager::createSchema () : Doctrine\DBAL\Schema\Schema

Creates a schema instance for the current database.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::createSchemaConfig () : Doctrine\DBAL\Schema\SchemaConfig

Creates the configuration for this schema.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::getSchemaSearchPaths () : string[]

The search path for namespaces in the currently connected database.

The first entry is usually the default namespace in the Schema. All
further namespaces contain tables/sequences which can also be addressed
with a short, not full-qualified name.

For databases that don't support subschema/namespaces this method
returns the name of the currently connected database.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::extractDoctrineTypeFromComment ($comment, $currentType) : string

Given a table comment this method tries to extract a typehint for Doctrine Type, or returns
the type given as default.

method Doctrine\DBAL\Schema\DrizzleSchemaManager::removeDoctrineTypeFromComment ($comment, $type) : stringnull

class Doctrine\DBAL\Schema::DB2SchemaManager

IBM Db2 Schema Manager.

property Doctrine\DBAL\Connection Doctrine\DBAL\Schema\DB2SchemaManager::_conn

Holds instance of the Doctrine connection for this schema manager.

property Doctrine\DBAL\Platforms\AbstractPlatform Doctrine\DBAL\Schema\DB2SchemaManager::_platform

Holds instance of the database platform used for this schema manager.

method Doctrine\DBAL\Schema\DB2SchemaManager::listTableNames () : string[]

Returns a list of all tables in the current database.

Apparently creator is the schema not the user who created it:

method Doctrine\DBAL\Schema\DB2SchemaManager::_getPortableTableColumnDefinition ($tableColumn) : Doctrine\DBAL\Schema\Column

Gets Table Column Definition.

method Doctrine\DBAL\Schema\DB2SchemaManager::_getPortableTablesList ($tables) : string[]

method Doctrine\DBAL\Schema\DB2SchemaManager::_getPortableTableIndexesList ($tableIndexRows, $tableName = null) : Doctrine\DBAL\Schema\Index[]

Aggregates and groups the index results according to the required data result.

method Doctrine\DBAL\Schema\DB2SchemaManager::_getPortableTableForeignKeyDefinition ($tableForeignKey) : Doctrine\DBAL\Schema\ForeignKeyConstraint

method Doctrine\DBAL\Schema\DB2SchemaManager::_getPortableTableForeignKeysList ($tableForeignKeys) : Doctrine\DBAL\Schema\ForeignKeyConstraint[]

method Doctrine\DBAL\Schema\DB2SchemaManager::_getPortableForeignKeyRuleDef ($def) : void

method Doctrine\DBAL\Schema\DB2SchemaManager::_getPortableViewDefinition ($view) : Doctrine\DBAL\Schema\Viewfalse

method Doctrine\DBAL\Schema\DB2SchemaManager::listTableDetails ($tableName) : Doctrine\DBAL\Schema\Table

method Doctrine\DBAL\Schema\DB2SchemaManager::__construct ($conn, $platform = null) : void

Constructor. Accepts the Connection instance to manage the schema for.

method Doctrine\DBAL\Schema\DB2SchemaManager::getDatabasePlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

Returns the associated platform.

method Doctrine\DBAL\Schema\DB2SchemaManager::tryMethod () : mixed

Tries any method on the schema manager. Normally a method throws an
exception when your DBMS doesn't support it or if an error occurs.
This method allows you to try and method on your SchemaManager
instance and will return false if it does not work or is not supported.


$result = $sm->tryMethod('dropView', 'view_name');

method Doctrine\DBAL\Schema\DB2SchemaManager::listDatabases () : string[]

Lists the available databases for this connection.

method Doctrine\DBAL\Schema\DB2SchemaManager::listNamespaceNames () : string[]

Returns a list of all namespaces in the current database.

method Doctrine\DBAL\Schema\DB2SchemaManager::listSequences ($database = null) : Doctrine\DBAL\Schema\Sequence[]

Lists the available sequences for this connection.

method Doctrine\DBAL\Schema\DB2SchemaManager::listTableColumns ($table, $database = null) : Doctrine\DBAL\Schema\Column[]

Lists the columns for a given table.

In contrast to other libraries and to the old version of Doctrine,
this column definition does try to contain the 'primary' field for
the reason that it is not portable across different RDBMS. Use
listTableIndexes($tableName) to retrieve the primary key
of a table. Where a RDBMS specifies more details, these are held
in the platformDetails array.

method Doctrine\DBAL\Schema\DB2SchemaManager::listTableIndexes ($table) : Doctrine\DBAL\Schema\Index[]

Lists the indexes for a given table returning an array of Index instances.

Keys of the portable indexes list are all lower-cased.

method Doctrine\DBAL\Schema\DB2SchemaManager::tablesExist ($tableNames) : bool

Returns true if all the given tables exist.

The usage of a string $tableNames is deprecated. Pass a one-element array instead.

method Doctrine\DBAL\Schema\DB2SchemaManager::filterAssetNames ($assetNames) : mixed[]

Filters asset names if they are configured to return only a subset of all
the found elements.

method Doctrine\DBAL\Schema\DB2SchemaManager::getFilterSchemaAssetsExpression () : stringnull

method Doctrine\DBAL\Schema\DB2SchemaManager::listTables () : Doctrine\DBAL\Schema\Table[]

Lists the tables for this connection.

method Doctrine\DBAL\Schema\DB2SchemaManager::listViews () : Doctrine\DBAL\Schema\View[]

Lists the views this connection has.

method Doctrine\DBAL\Schema\DB2SchemaManager::listTableForeignKeys ($table, $database = null) : Doctrine\DBAL\Schema\ForeignKeyConstraint[]

Lists the foreign keys for the given table.

method Doctrine\DBAL\Schema\DB2SchemaManager::dropDatabase ($database) : void

Drops a database.

NOTE: You can not drop the database this SchemaManager is currently connected to.

method Doctrine\DBAL\Schema\DB2SchemaManager::dropTable ($tableName) : void

Drops the given table.

method Doctrine\DBAL\Schema\DB2SchemaManager::dropIndex ($index, $table) : void

Drops the index from the given table.

method Doctrine\DBAL\Schema\DB2SchemaManager::dropConstraint ($constraint, $table) : void

Drops the constraint from the given table.

method Doctrine\DBAL\Schema\DB2SchemaManager::dropForeignKey ($foreignKey, $table) : void

Drops a foreign key from a table.

method Doctrine\DBAL\Schema\DB2SchemaManager::dropSequence ($name) : void

Drops a sequence with a given name.

method Doctrine\DBAL\Schema\DB2SchemaManager::dropView ($name) : void

Drops a view.

method Doctrine\DBAL\Schema\DB2SchemaManager::createDatabase ($database) : void

Creates a new database.

method Doctrine\DBAL\Schema\DB2SchemaManager::createTable ($table) : void

Creates a new table.

method Doctrine\DBAL\Schema\DB2SchemaManager::createSequence ($sequence) : void

Creates a new sequence.

method Doctrine\DBAL\Schema\DB2SchemaManager::createConstraint ($constraint, $table) : void

Creates a constraint on a table.

method Doctrine\DBAL\Schema\DB2SchemaManager::createIndex ($index, $table) : void

Creates a new index on a table.

method Doctrine\DBAL\Schema\DB2SchemaManager::createForeignKey ($foreignKey, $table) : void

Creates a new foreign key.

method Doctrine\DBAL\Schema\DB2SchemaManager::createView ($view) : void

Creates a new view.

method Doctrine\DBAL\Schema\DB2SchemaManager::dropAndCreateConstraint ($constraint, $table) : void

Drops and creates a constraint.

method Doctrine\DBAL\Schema\DB2SchemaManager::dropAndCreateIndex ($index, $table) : void

Drops and creates a new index on a table.

method Doctrine\DBAL\Schema\DB2SchemaManager::dropAndCreateForeignKey ($foreignKey, $table) : void

Drops and creates a new foreign key.

method Doctrine\DBAL\Schema\DB2SchemaManager::dropAndCreateSequence ($sequence) : void

Drops and create a new sequence.

method Doctrine\DBAL\Schema\DB2SchemaManager::dropAndCreateTable ($table) : void

Drops and creates a new table.

method Doctrine\DBAL\Schema\DB2SchemaManager::dropAndCreateDatabase ($database) : void

Drops and creates a new database.

method Doctrine\DBAL\Schema\DB2SchemaManager::dropAndCreateView ($view) : void

Drops and creates a new view.

method Doctrine\DBAL\Schema\DB2SchemaManager::alterTable ($tableDiff) : void

Alters an existing tables schema.

method Doctrine\DBAL\Schema\DB2SchemaManager::renameTable ($name, $newName) : void

Renames a given table to another name.

method Doctrine\DBAL\Schema\DB2SchemaManager::_getPortableDatabasesList ($databases) : string[]

method Doctrine\DBAL\Schema\DB2SchemaManager::getPortableNamespacesList ($namespaces) : string[]

Converts a list of namespace names from the native DBMS data definition to a portable Doctrine definition.

method Doctrine\DBAL\Schema\DB2SchemaManager::_getPortableDatabaseDefinition ($database) : mixed

method Doctrine\DBAL\Schema\DB2SchemaManager::getPortableNamespaceDefinition ($namespace) : mixed

Converts a namespace definition from the native DBMS data definition to a portable Doctrine definition.

method Doctrine\DBAL\Schema\DB2SchemaManager::_getPortableFunctionsList ($functions) : mixed[][]

method Doctrine\DBAL\Schema\DB2SchemaManager::_getPortableFunctionDefinition ($function) : mixed

method Doctrine\DBAL\Schema\DB2SchemaManager::_getPortableTriggersList ($triggers) : mixed[][]

method Doctrine\DBAL\Schema\DB2SchemaManager::_getPortableTriggerDefinition ($trigger) : mixed

method Doctrine\DBAL\Schema\DB2SchemaManager::_getPortableSequencesList ($sequences) : Doctrine\DBAL\Schema\Sequence[]

method Doctrine\DBAL\Schema\DB2SchemaManager::_getPortableSequenceDefinition ($sequence) : Doctrine\DBAL\Schema\Sequence

method Doctrine\DBAL\Schema\DB2SchemaManager::_getPortableTableColumnList ($table, $database, $tableColumns) : Doctrine\DBAL\Schema\Column[]

Independent of the database the keys of the column list result are lowercased.

The name of the created column instance however is kept in its case.

method Doctrine\DBAL\Schema\DB2SchemaManager::_getPortableTableDefinition ($table) : string

method Doctrine\DBAL\Schema\DB2SchemaManager::_getPortableUsersList ($users) : string[][]

method Doctrine\DBAL\Schema\DB2SchemaManager::_getPortableUserDefinition ($user) : string[]

method Doctrine\DBAL\Schema\DB2SchemaManager::_getPortableViewsList ($views) : Doctrine\DBAL\Schema\View[]

method Doctrine\DBAL\Schema\DB2SchemaManager::_execSql ($sql) : void

method Doctrine\DBAL\Schema\DB2SchemaManager::createSchema () : Doctrine\DBAL\Schema\Schema

Creates a schema instance for the current database.

method Doctrine\DBAL\Schema\DB2SchemaManager::createSchemaConfig () : Doctrine\DBAL\Schema\SchemaConfig

Creates the configuration for this schema.

method Doctrine\DBAL\Schema\DB2SchemaManager::getSchemaSearchPaths () : string[]

The search path for namespaces in the currently connected database.

The first entry is usually the default namespace in the Schema. All
further namespaces contain tables/sequences which can also be addressed
with a short, not full-qualified name.

For databases that don't support subschema/namespaces this method
returns the name of the currently connected database.

method Doctrine\DBAL\Schema\DB2SchemaManager::extractDoctrineTypeFromComment ($comment, $currentType) : string

Given a table comment this method tries to extract a typehint for Doctrine Type, or returns
the type given as default.

method Doctrine\DBAL\Schema\DB2SchemaManager::removeDoctrineTypeFromComment ($comment, $type) : stringnull

class Doctrine\DBAL\Schema::MySqlSchemaManager

Schema manager for the MySql RDBMS.

property Doctrine\DBAL\Connection Doctrine\DBAL\Schema\MySqlSchemaManager::_conn

Holds instance of the Doctrine connection for this schema manager.

property Doctrine\DBAL\Platforms\AbstractPlatform Doctrine\DBAL\Schema\MySqlSchemaManager::_platform

Holds instance of the database platform used for this schema manager.

method Doctrine\DBAL\Schema\MySqlSchemaManager::_getPortableViewDefinition ($view) : Doctrine\DBAL\Schema\Viewfalse

method Doctrine\DBAL\Schema\MySqlSchemaManager::_getPortableTableDefinition ($table) : string

method Doctrine\DBAL\Schema\MySqlSchemaManager::_getPortableUserDefinition ($user) : string[]

method Doctrine\DBAL\Schema\MySqlSchemaManager::_getPortableTableIndexesList ($tableIndexes, $tableName = null) : Doctrine\DBAL\Schema\Index[]

Aggregates and groups the index results according to the required data result.

method Doctrine\DBAL\Schema\MySqlSchemaManager::_getPortableDatabaseDefinition ($database) : mixed

method Doctrine\DBAL\Schema\MySqlSchemaManager::_getPortableTableColumnDefinition ($tableColumn) : Doctrine\DBAL\Schema\Column

Gets Table Column Definition.

method Doctrine\DBAL\Schema\MySqlSchemaManager::_getPortableTableForeignKeysList ($tableForeignKeys) : Doctrine\DBAL\Schema\ForeignKeyConstraint[]

method Doctrine\DBAL\Schema\MySqlSchemaManager::listTableDetails ($tableName) : Doctrine\DBAL\Schema\Table

method Doctrine\DBAL\Schema\MySqlSchemaManager::__construct ($conn, $platform = null) : void

Constructor. Accepts the Connection instance to manage the schema for.

method Doctrine\DBAL\Schema\MySqlSchemaManager::getDatabasePlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

Returns the associated platform.

method Doctrine\DBAL\Schema\MySqlSchemaManager::tryMethod () : mixed

Tries any method on the schema manager. Normally a method throws an
exception when your DBMS doesn't support it or if an error occurs.
This method allows you to try and method on your SchemaManager
instance and will return false if it does not work or is not supported.


$result = $sm->tryMethod('dropView', 'view_name');

method Doctrine\DBAL\Schema\MySqlSchemaManager::listDatabases () : string[]

Lists the available databases for this connection.

method Doctrine\DBAL\Schema\MySqlSchemaManager::listNamespaceNames () : string[]

Returns a list of all namespaces in the current database.

method Doctrine\DBAL\Schema\MySqlSchemaManager::listSequences ($database = null) : Doctrine\DBAL\Schema\Sequence[]

Lists the available sequences for this connection.

method Doctrine\DBAL\Schema\MySqlSchemaManager::listTableColumns ($table, $database = null) : Doctrine\DBAL\Schema\Column[]

Lists the columns for a given table.

In contrast to other libraries and to the old version of Doctrine,
this column definition does try to contain the 'primary' field for
the reason that it is not portable across different RDBMS. Use
listTableIndexes($tableName) to retrieve the primary key
of a table. Where a RDBMS specifies more details, these are held
in the platformDetails array.

method Doctrine\DBAL\Schema\MySqlSchemaManager::listTableIndexes ($table) : Doctrine\DBAL\Schema\Index[]

Lists the indexes for a given table returning an array of Index instances.

Keys of the portable indexes list are all lower-cased.

method Doctrine\DBAL\Schema\MySqlSchemaManager::tablesExist ($tableNames) : bool

Returns true if all the given tables exist.

The usage of a string $tableNames is deprecated. Pass a one-element array instead.

method Doctrine\DBAL\Schema\MySqlSchemaManager::listTableNames () : string[]

Returns a list of all tables in the current database.

method Doctrine\DBAL\Schema\MySqlSchemaManager::filterAssetNames ($assetNames) : mixed[]

Filters asset names if they are configured to return only a subset of all
the found elements.

method Doctrine\DBAL\Schema\MySqlSchemaManager::getFilterSchemaAssetsExpression () : stringnull

method Doctrine\DBAL\Schema\MySqlSchemaManager::listTables () : Doctrine\DBAL\Schema\Table[]

Lists the tables for this connection.

method Doctrine\DBAL\Schema\MySqlSchemaManager::listViews () : Doctrine\DBAL\Schema\View[]

Lists the views this connection has.

method Doctrine\DBAL\Schema\MySqlSchemaManager::listTableForeignKeys ($table, $database = null) : Doctrine\DBAL\Schema\ForeignKeyConstraint[]

Lists the foreign keys for the given table.

method Doctrine\DBAL\Schema\MySqlSchemaManager::dropDatabase ($database) : void

Drops a database.

NOTE: You can not drop the database this SchemaManager is currently connected to.

method Doctrine\DBAL\Schema\MySqlSchemaManager::dropTable ($tableName) : void

Drops the given table.

method Doctrine\DBAL\Schema\MySqlSchemaManager::dropIndex ($index, $table) : void

Drops the index from the given table.

method Doctrine\DBAL\Schema\MySqlSchemaManager::dropConstraint ($constraint, $table) : void

Drops the constraint from the given table.

method Doctrine\DBAL\Schema\MySqlSchemaManager::dropForeignKey ($foreignKey, $table) : void

Drops a foreign key from a table.

method Doctrine\DBAL\Schema\MySqlSchemaManager::dropSequence ($name) : void

Drops a sequence with a given name.

method Doctrine\DBAL\Schema\MySqlSchemaManager::dropView ($name) : void

Drops a view.

method Doctrine\DBAL\Schema\MySqlSchemaManager::createDatabase ($database) : void

Creates a new database.

method Doctrine\DBAL\Schema\MySqlSchemaManager::createTable ($table) : void

Creates a new table.

method Doctrine\DBAL\Schema\MySqlSchemaManager::createSequence ($sequence) : void

Creates a new sequence.

method Doctrine\DBAL\Schema\MySqlSchemaManager::createConstraint ($constraint, $table) : void

Creates a constraint on a table.

method Doctrine\DBAL\Schema\MySqlSchemaManager::createIndex ($index, $table) : void

Creates a new index on a table.

method Doctrine\DBAL\Schema\MySqlSchemaManager::createForeignKey ($foreignKey, $table) : void

Creates a new foreign key.

method Doctrine\DBAL\Schema\MySqlSchemaManager::createView ($view) : void

Creates a new view.

method Doctrine\DBAL\Schema\MySqlSchemaManager::dropAndCreateConstraint ($constraint, $table) : void

Drops and creates a constraint.

method Doctrine\DBAL\Schema\MySqlSchemaManager::dropAndCreateIndex ($index, $table) : void

Drops and creates a new index on a table.

method Doctrine\DBAL\Schema\MySqlSchemaManager::dropAndCreateForeignKey ($foreignKey, $table) : void

Drops and creates a new foreign key.

method Doctrine\DBAL\Schema\MySqlSchemaManager::dropAndCreateSequence ($sequence) : void

Drops and create a new sequence.

method Doctrine\DBAL\Schema\MySqlSchemaManager::dropAndCreateTable ($table) : void

Drops and creates a new table.

method Doctrine\DBAL\Schema\MySqlSchemaManager::dropAndCreateDatabase ($database) : void

Drops and creates a new database.

method Doctrine\DBAL\Schema\MySqlSchemaManager::dropAndCreateView ($view) : void

Drops and creates a new view.

method Doctrine\DBAL\Schema\MySqlSchemaManager::alterTable ($tableDiff) : void

Alters an existing tables schema.

method Doctrine\DBAL\Schema\MySqlSchemaManager::renameTable ($name, $newName) : void

Renames a given table to another name.

method Doctrine\DBAL\Schema\MySqlSchemaManager::_getPortableDatabasesList ($databases) : string[]

method Doctrine\DBAL\Schema\MySqlSchemaManager::getPortableNamespacesList ($namespaces) : string[]

Converts a list of namespace names from the native DBMS data definition to a portable Doctrine definition.

method Doctrine\DBAL\Schema\MySqlSchemaManager::getPortableNamespaceDefinition ($namespace) : mixed

Converts a namespace definition from the native DBMS data definition to a portable Doctrine definition.

method Doctrine\DBAL\Schema\MySqlSchemaManager::_getPortableFunctionsList ($functions) : mixed[][]

method Doctrine\DBAL\Schema\MySqlSchemaManager::_getPortableFunctionDefinition ($function) : mixed

method Doctrine\DBAL\Schema\MySqlSchemaManager::_getPortableTriggersList ($triggers) : mixed[][]

method Doctrine\DBAL\Schema\MySqlSchemaManager::_getPortableTriggerDefinition ($trigger) : mixed

method Doctrine\DBAL\Schema\MySqlSchemaManager::_getPortableSequencesList ($sequences) : Doctrine\DBAL\Schema\Sequence[]

method Doctrine\DBAL\Schema\MySqlSchemaManager::_getPortableSequenceDefinition ($sequence) : Doctrine\DBAL\Schema\Sequence

method Doctrine\DBAL\Schema\MySqlSchemaManager::_getPortableTableColumnList ($table, $database, $tableColumns) : Doctrine\DBAL\Schema\Column[]

Independent of the database the keys of the column list result are lowercased.

The name of the created column instance however is kept in its case.

method Doctrine\DBAL\Schema\MySqlSchemaManager::_getPortableTablesList ($tables) : string[]

method Doctrine\DBAL\Schema\MySqlSchemaManager::_getPortableUsersList ($users) : string[][]

method Doctrine\DBAL\Schema\MySqlSchemaManager::_getPortableViewsList ($views) : Doctrine\DBAL\Schema\View[]

method Doctrine\DBAL\Schema\MySqlSchemaManager::_getPortableTableForeignKeyDefinition ($tableForeignKey) : Doctrine\DBAL\Schema\ForeignKeyConstraint

method Doctrine\DBAL\Schema\MySqlSchemaManager::_execSql ($sql) : void

method Doctrine\DBAL\Schema\MySqlSchemaManager::createSchema () : Doctrine\DBAL\Schema\Schema

Creates a schema instance for the current database.

method Doctrine\DBAL\Schema\MySqlSchemaManager::createSchemaConfig () : Doctrine\DBAL\Schema\SchemaConfig

Creates the configuration for this schema.

method Doctrine\DBAL\Schema\MySqlSchemaManager::getSchemaSearchPaths () : string[]

The search path for namespaces in the currently connected database.

The first entry is usually the default namespace in the Schema. All
further namespaces contain tables/sequences which can also be addressed
with a short, not full-qualified name.

For databases that don't support subschema/namespaces this method
returns the name of the currently connected database.

method Doctrine\DBAL\Schema\MySqlSchemaManager::extractDoctrineTypeFromComment ($comment, $currentType) : string

Given a table comment this method tries to extract a typehint for Doctrine Type, or returns
the type given as default.

method Doctrine\DBAL\Schema\MySqlSchemaManager::removeDoctrineTypeFromComment ($comment, $type) : stringnull

class Doctrine\DBAL\Schema::OracleSchemaManager

Oracle Schema Manager.

property Doctrine\DBAL\Connection Doctrine\DBAL\Schema\OracleSchemaManager::_conn

Holds instance of the Doctrine connection for this schema manager.

property Doctrine\DBAL\Platforms\AbstractPlatform Doctrine\DBAL\Schema\OracleSchemaManager::_platform

Holds instance of the database platform used for this schema manager.

method Doctrine\DBAL\Schema\OracleSchemaManager::dropDatabase ($database) : void

Drops a database.

NOTE: You can not drop the database this SchemaManager is currently connected to.

method Doctrine\DBAL\Schema\OracleSchemaManager::_getPortableViewDefinition ($view) : Doctrine\DBAL\Schema\Viewfalse

method Doctrine\DBAL\Schema\OracleSchemaManager::_getPortableUserDefinition ($user) : string[]

method Doctrine\DBAL\Schema\OracleSchemaManager::_getPortableTableDefinition ($table) : string

method Doctrine\DBAL\Schema\OracleSchemaManager::_getPortableTableIndexesList ($tableIndexes, $tableName = null) : Doctrine\DBAL\Schema\Index[]

Aggregates and groups the index results according to the required data result.

method Doctrine\DBAL\Schema\OracleSchemaManager::_getPortableTableColumnDefinition ($tableColumn) : Doctrine\DBAL\Schema\Column

Gets Table Column Definition.

method Doctrine\DBAL\Schema\OracleSchemaManager::_getPortableTableForeignKeysList ($tableForeignKeys) : Doctrine\DBAL\Schema\ForeignKeyConstraint[]

method Doctrine\DBAL\Schema\OracleSchemaManager::_getPortableSequenceDefinition ($sequence) : Doctrine\DBAL\Schema\Sequence

method Doctrine\DBAL\Schema\OracleSchemaManager::_getPortableFunctionDefinition ($function) : mixed

method Doctrine\DBAL\Schema\OracleSchemaManager::_getPortableDatabaseDefinition ($database) : mixed

method Doctrine\DBAL\Schema\OracleSchemaManager::createDatabase ($database) : void

Creates a new database.

Calling this method without an argument or by passing NULL is deprecated.

method Doctrine\DBAL\Schema\OracleSchemaManager::dropAutoincrement ($table) : bool

method Doctrine\DBAL\Schema\OracleSchemaManager::dropTable ($name) : void

Drops the given table.

method Doctrine\DBAL\Schema\OracleSchemaManager::listTableDetails ($tableName) : Doctrine\DBAL\Schema\Table

method Doctrine\DBAL\Schema\OracleSchemaManager::__construct ($conn, $platform = null) : void

Constructor. Accepts the Connection instance to manage the schema for.

method Doctrine\DBAL\Schema\OracleSchemaManager::getDatabasePlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

Returns the associated platform.

method Doctrine\DBAL\Schema\OracleSchemaManager::tryMethod () : mixed

Tries any method on the schema manager. Normally a method throws an
exception when your DBMS doesn't support it or if an error occurs.
This method allows you to try and method on your SchemaManager
instance and will return false if it does not work or is not supported.


$result = $sm->tryMethod('dropView', 'view_name');

method Doctrine\DBAL\Schema\OracleSchemaManager::listDatabases () : string[]

Lists the available databases for this connection.

method Doctrine\DBAL\Schema\OracleSchemaManager::listNamespaceNames () : string[]

Returns a list of all namespaces in the current database.

method Doctrine\DBAL\Schema\OracleSchemaManager::listSequences ($database = null) : Doctrine\DBAL\Schema\Sequence[]

Lists the available sequences for this connection.

method Doctrine\DBAL\Schema\OracleSchemaManager::listTableColumns ($table, $database = null) : Doctrine\DBAL\Schema\Column[]

Lists the columns for a given table.

In contrast to other libraries and to the old version of Doctrine,
this column definition does try to contain the 'primary' field for
the reason that it is not portable across different RDBMS. Use
listTableIndexes($tableName) to retrieve the primary key
of a table. Where a RDBMS specifies more details, these are held
in the platformDetails array.

method Doctrine\DBAL\Schema\OracleSchemaManager::listTableIndexes ($table) : Doctrine\DBAL\Schema\Index[]

Lists the indexes for a given table returning an array of Index instances.

Keys of the portable indexes list are all lower-cased.

method Doctrine\DBAL\Schema\OracleSchemaManager::tablesExist ($tableNames) : bool

Returns true if all the given tables exist.

The usage of a string $tableNames is deprecated. Pass a one-element array instead.

method Doctrine\DBAL\Schema\OracleSchemaManager::listTableNames () : string[]

Returns a list of all tables in the current database.

method Doctrine\DBAL\Schema\OracleSchemaManager::filterAssetNames ($assetNames) : mixed[]

Filters asset names if they are configured to return only a subset of all
the found elements.

method Doctrine\DBAL\Schema\OracleSchemaManager::getFilterSchemaAssetsExpression () : stringnull

method Doctrine\DBAL\Schema\OracleSchemaManager::listTables () : Doctrine\DBAL\Schema\Table[]

Lists the tables for this connection.

method Doctrine\DBAL\Schema\OracleSchemaManager::listViews () : Doctrine\DBAL\Schema\View[]

Lists the views this connection has.

method Doctrine\DBAL\Schema\OracleSchemaManager::listTableForeignKeys ($table, $database = null) : Doctrine\DBAL\Schema\ForeignKeyConstraint[]

Lists the foreign keys for the given table.

method Doctrine\DBAL\Schema\OracleSchemaManager::dropIndex ($index, $table) : void

Drops the index from the given table.

method Doctrine\DBAL\Schema\OracleSchemaManager::dropConstraint ($constraint, $table) : void

Drops the constraint from the given table.

method Doctrine\DBAL\Schema\OracleSchemaManager::dropForeignKey ($foreignKey, $table) : void

Drops a foreign key from a table.

method Doctrine\DBAL\Schema\OracleSchemaManager::dropSequence ($name) : void

Drops a sequence with a given name.

method Doctrine\DBAL\Schema\OracleSchemaManager::dropView ($name) : void

Drops a view.

method Doctrine\DBAL\Schema\OracleSchemaManager::createTable ($table) : void

Creates a new table.

method Doctrine\DBAL\Schema\OracleSchemaManager::createSequence ($sequence) : void

Creates a new sequence.

method Doctrine\DBAL\Schema\OracleSchemaManager::createConstraint ($constraint, $table) : void

Creates a constraint on a table.

method Doctrine\DBAL\Schema\OracleSchemaManager::createIndex ($index, $table) : void

Creates a new index on a table.

method Doctrine\DBAL\Schema\OracleSchemaManager::createForeignKey ($foreignKey, $table) : void

Creates a new foreign key.

method Doctrine\DBAL\Schema\OracleSchemaManager::createView ($view) : void

Creates a new view.

method Doctrine\DBAL\Schema\OracleSchemaManager::dropAndCreateConstraint ($constraint, $table) : void

Drops and creates a constraint.

method Doctrine\DBAL\Schema\OracleSchemaManager::dropAndCreateIndex ($index, $table) : void

Drops and creates a new index on a table.

method Doctrine\DBAL\Schema\OracleSchemaManager::dropAndCreateForeignKey ($foreignKey, $table) : void

Drops and creates a new foreign key.

method Doctrine\DBAL\Schema\OracleSchemaManager::dropAndCreateSequence ($sequence) : void

Drops and create a new sequence.

method Doctrine\DBAL\Schema\OracleSchemaManager::dropAndCreateTable ($table) : void

Drops and creates a new table.

method Doctrine\DBAL\Schema\OracleSchemaManager::dropAndCreateDatabase ($database) : void

Drops and creates a new database.

method Doctrine\DBAL\Schema\OracleSchemaManager::dropAndCreateView ($view) : void

Drops and creates a new view.

method Doctrine\DBAL\Schema\OracleSchemaManager::alterTable ($tableDiff) : void

Alters an existing tables schema.

method Doctrine\DBAL\Schema\OracleSchemaManager::renameTable ($name, $newName) : void

Renames a given table to another name.

method Doctrine\DBAL\Schema\OracleSchemaManager::_getPortableDatabasesList ($databases) : string[]

method Doctrine\DBAL\Schema\OracleSchemaManager::getPortableNamespacesList ($namespaces) : string[]

Converts a list of namespace names from the native DBMS data definition to a portable Doctrine definition.

method Doctrine\DBAL\Schema\OracleSchemaManager::getPortableNamespaceDefinition ($namespace) : mixed

Converts a namespace definition from the native DBMS data definition to a portable Doctrine definition.

method Doctrine\DBAL\Schema\OracleSchemaManager::_getPortableFunctionsList ($functions) : mixed[][]

method Doctrine\DBAL\Schema\OracleSchemaManager::_getPortableTriggersList ($triggers) : mixed[][]

method Doctrine\DBAL\Schema\OracleSchemaManager::_getPortableTriggerDefinition ($trigger) : mixed

method Doctrine\DBAL\Schema\OracleSchemaManager::_getPortableSequencesList ($sequences) : Doctrine\DBAL\Schema\Sequence[]

method Doctrine\DBAL\Schema\OracleSchemaManager::_getPortableTableColumnList ($table, $database, $tableColumns) : Doctrine\DBAL\Schema\Column[]

Independent of the database the keys of the column list result are lowercased.

The name of the created column instance however is kept in its case.

method Doctrine\DBAL\Schema\OracleSchemaManager::_getPortableTablesList ($tables) : string[]

method Doctrine\DBAL\Schema\OracleSchemaManager::_getPortableUsersList ($users) : string[][]

method Doctrine\DBAL\Schema\OracleSchemaManager::_getPortableViewsList ($views) : Doctrine\DBAL\Schema\View[]

method Doctrine\DBAL\Schema\OracleSchemaManager::_getPortableTableForeignKeyDefinition ($tableForeignKey) : Doctrine\DBAL\Schema\ForeignKeyConstraint

method Doctrine\DBAL\Schema\OracleSchemaManager::_execSql ($sql) : void

method Doctrine\DBAL\Schema\OracleSchemaManager::createSchema () : Doctrine\DBAL\Schema\Schema

Creates a schema instance for the current database.

method Doctrine\DBAL\Schema\OracleSchemaManager::createSchemaConfig () : Doctrine\DBAL\Schema\SchemaConfig

Creates the configuration for this schema.

method Doctrine\DBAL\Schema\OracleSchemaManager::getSchemaSearchPaths () : string[]

The search path for namespaces in the currently connected database.

The first entry is usually the default namespace in the Schema. All
further namespaces contain tables/sequences which can also be addressed
with a short, not full-qualified name.

For databases that don't support subschema/namespaces this method
returns the name of the currently connected database.

method Doctrine\DBAL\Schema\OracleSchemaManager::extractDoctrineTypeFromComment ($comment, $currentType) : string

Given a table comment this method tries to extract a typehint for Doctrine Type, or returns
the type given as default.

method Doctrine\DBAL\Schema\OracleSchemaManager::removeDoctrineTypeFromComment ($comment, $type) : stringnull

class Doctrine\DBAL\Schema::PostgreSqlSchemaManager

PostgreSQL Schema Manager.

property Doctrine\DBAL\Connection Doctrine\DBAL\Schema\PostgreSqlSchemaManager::_conn

Holds instance of the Doctrine connection for this schema manager.

property Doctrine\DBAL\Platforms\AbstractPlatform Doctrine\DBAL\Schema\PostgreSqlSchemaManager::_platform

Holds instance of the database platform used for this schema manager.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::getSchemaNames () : string[]

Gets all the existing schema names.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::getSchemaSearchPaths () : string[]

Returns an array of schema search paths.

This is a PostgreSQL only function.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::getExistingSchemaSearchPaths () : string[]

Gets names of all existing schemas in the current users search path.

This is a PostgreSQL only function.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::determineExistingSchemaSearchPaths () : void

Sets or resets the order of the existing schemas in the current search path of the user.

This is a PostgreSQL only function.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::dropDatabase ($database) : void

Drops a database.

NOTE: You can not drop the database this SchemaManager is currently connected to.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::_getPortableTableForeignKeyDefinition ($tableForeignKey) : Doctrine\DBAL\Schema\ForeignKeyConstraint

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::_getPortableTriggerDefinition ($trigger) : mixed

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::_getPortableViewDefinition ($view) : Doctrine\DBAL\Schema\Viewfalse

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::_getPortableUserDefinition ($user) : string[]

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::_getPortableTableDefinition ($table) : string

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::_getPortableTableIndexesList ($tableIndexes, $tableName = null) : Doctrine\DBAL\Schema\Index[]

Aggregates and groups the index results according to the required data result.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::_getPortableDatabaseDefinition ($database) : mixed

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::_getPortableSequencesList ($sequences) : Doctrine\DBAL\Schema\Sequence[]

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::getPortableNamespaceDefinition ($namespace) : mixed

Converts a namespace definition from the native DBMS data definition to a portable Doctrine definition.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::_getPortableSequenceDefinition ($sequence) : Doctrine\DBAL\Schema\Sequence

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::_getPortableTableColumnDefinition ($tableColumn) : Doctrine\DBAL\Schema\Column

Gets Table Column Definition.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::listTableDetails ($tableName) : Doctrine\DBAL\Schema\Table

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::__construct ($conn, $platform = null) : void

Constructor. Accepts the Connection instance to manage the schema for.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::getDatabasePlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

Returns the associated platform.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::tryMethod () : mixed

Tries any method on the schema manager. Normally a method throws an
exception when your DBMS doesn't support it or if an error occurs.
This method allows you to try and method on your SchemaManager
instance and will return false if it does not work or is not supported.


$result = $sm->tryMethod('dropView', 'view_name');

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::listDatabases () : string[]

Lists the available databases for this connection.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::listNamespaceNames () : string[]

Returns a list of all namespaces in the current database.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::listSequences ($database = null) : Doctrine\DBAL\Schema\Sequence[]

Lists the available sequences for this connection.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::listTableColumns ($table, $database = null) : Doctrine\DBAL\Schema\Column[]

Lists the columns for a given table.

In contrast to other libraries and to the old version of Doctrine,
this column definition does try to contain the 'primary' field for
the reason that it is not portable across different RDBMS. Use
listTableIndexes($tableName) to retrieve the primary key
of a table. Where a RDBMS specifies more details, these are held
in the platformDetails array.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::listTableIndexes ($table) : Doctrine\DBAL\Schema\Index[]

Lists the indexes for a given table returning an array of Index instances.

Keys of the portable indexes list are all lower-cased.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::tablesExist ($tableNames) : bool

Returns true if all the given tables exist.

The usage of a string $tableNames is deprecated. Pass a one-element array instead.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::listTableNames () : string[]

Returns a list of all tables in the current database.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::filterAssetNames ($assetNames) : mixed[]

Filters asset names if they are configured to return only a subset of all
the found elements.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::getFilterSchemaAssetsExpression () : stringnull

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::listTables () : Doctrine\DBAL\Schema\Table[]

Lists the tables for this connection.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::listViews () : Doctrine\DBAL\Schema\View[]

Lists the views this connection has.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::listTableForeignKeys ($table, $database = null) : Doctrine\DBAL\Schema\ForeignKeyConstraint[]

Lists the foreign keys for the given table.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::dropTable ($tableName) : void

Drops the given table.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::dropIndex ($index, $table) : void

Drops the index from the given table.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::dropConstraint ($constraint, $table) : void

Drops the constraint from the given table.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::dropForeignKey ($foreignKey, $table) : void

Drops a foreign key from a table.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::dropSequence ($name) : void

Drops a sequence with a given name.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::dropView ($name) : void

Drops a view.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::createDatabase ($database) : void

Creates a new database.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::createTable ($table) : void

Creates a new table.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::createSequence ($sequence) : void

Creates a new sequence.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::createConstraint ($constraint, $table) : void

Creates a constraint on a table.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::createIndex ($index, $table) : void

Creates a new index on a table.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::createForeignKey ($foreignKey, $table) : void

Creates a new foreign key.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::createView ($view) : void

Creates a new view.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::dropAndCreateConstraint ($constraint, $table) : void

Drops and creates a constraint.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::dropAndCreateIndex ($index, $table) : void

Drops and creates a new index on a table.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::dropAndCreateForeignKey ($foreignKey, $table) : void

Drops and creates a new foreign key.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::dropAndCreateSequence ($sequence) : void

Drops and create a new sequence.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::dropAndCreateTable ($table) : void

Drops and creates a new table.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::dropAndCreateDatabase ($database) : void

Drops and creates a new database.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::dropAndCreateView ($view) : void

Drops and creates a new view.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::alterTable ($tableDiff) : void

Alters an existing tables schema.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::renameTable ($name, $newName) : void

Renames a given table to another name.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::_getPortableDatabasesList ($databases) : string[]

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::getPortableNamespacesList ($namespaces) : string[]

Converts a list of namespace names from the native DBMS data definition to a portable Doctrine definition.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::_getPortableFunctionsList ($functions) : mixed[][]

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::_getPortableFunctionDefinition ($function) : mixed

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::_getPortableTriggersList ($triggers) : mixed[][]

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::_getPortableTableColumnList ($table, $database, $tableColumns) : Doctrine\DBAL\Schema\Column[]

Independent of the database the keys of the column list result are lowercased.

The name of the created column instance however is kept in its case.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::_getPortableTablesList ($tables) : string[]

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::_getPortableUsersList ($users) : string[][]

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::_getPortableViewsList ($views) : Doctrine\DBAL\Schema\View[]

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::_getPortableTableForeignKeysList ($tableForeignKeys) : Doctrine\DBAL\Schema\ForeignKeyConstraint[]

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::_execSql ($sql) : void

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::createSchema () : Doctrine\DBAL\Schema\Schema

Creates a schema instance for the current database.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::createSchemaConfig () : Doctrine\DBAL\Schema\SchemaConfig

Creates the configuration for this schema.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::extractDoctrineTypeFromComment ($comment, $currentType) : string

Given a table comment this method tries to extract a typehint for Doctrine Type, or returns
the type given as default.

method Doctrine\DBAL\Schema\PostgreSqlSchemaManager::removeDoctrineTypeFromComment ($comment, $type) : stringnull

class Doctrine\DBAL\Schema::SqliteSchemaManager

Sqlite SchemaManager.

property Doctrine\DBAL\Connection Doctrine\DBAL\Schema\SqliteSchemaManager::_conn

Holds instance of the Doctrine connection for this schema manager.

property Doctrine\DBAL\Platforms\AbstractPlatform Doctrine\DBAL\Schema\SqliteSchemaManager::_platform

Holds instance of the database platform used for this schema manager.

method Doctrine\DBAL\Schema\SqliteSchemaManager::dropDatabase ($database) : void

Drops a database.

NOTE: You can not drop the database this SchemaManager is currently connected to.

method Doctrine\DBAL\Schema\SqliteSchemaManager::createDatabase ($database) : void

Creates a new database.

method Doctrine\DBAL\Schema\SqliteSchemaManager::renameTable ($name, $newName) : void

Renames a given table to another name.

method Doctrine\DBAL\Schema\SqliteSchemaManager::createForeignKey ($foreignKey, $table) : void

Creates a new foreign key.

method Doctrine\DBAL\Schema\SqliteSchemaManager::dropAndCreateForeignKey ($foreignKey, $table) : void

Drops and creates a new foreign key.

method Doctrine\DBAL\Schema\SqliteSchemaManager::dropForeignKey ($foreignKey, $table) : void

Drops a foreign key from a table.

method Doctrine\DBAL\Schema\SqliteSchemaManager::listTableForeignKeys ($table, $database = null) : Doctrine\DBAL\Schema\ForeignKeyConstraint[]

Lists the foreign keys for the given table.

method Doctrine\DBAL\Schema\SqliteSchemaManager::_getPortableTableDefinition ($table) : string

method Doctrine\DBAL\Schema\SqliteSchemaManager::_getPortableTableIndexesList ($tableIndexes, $tableName = null) : Doctrine\DBAL\Schema\Index[]

Aggregates and groups the index results according to the required data result.

method Doctrine\DBAL\Schema\SqliteSchemaManager::_getPortableTableIndexDefinition ($tableIndex) : void

method Doctrine\DBAL\Schema\SqliteSchemaManager::_getPortableTableColumnList ($table, $database, $tableColumns) : Doctrine\DBAL\Schema\Column[]

Independent of the database the keys of the column list result are lowercased.

The name of the created column instance however is kept in its case.

method Doctrine\DBAL\Schema\SqliteSchemaManager::_getPortableTableColumnDefinition ($tableColumn) : Doctrine\DBAL\Schema\Column

Gets Table Column Definition.

method Doctrine\DBAL\Schema\SqliteSchemaManager::_getPortableViewDefinition ($view) : Doctrine\DBAL\Schema\Viewfalse

method Doctrine\DBAL\Schema\SqliteSchemaManager::_getPortableTableForeignKeysList ($tableForeignKeys) : Doctrine\DBAL\Schema\ForeignKeyConstraint[]

method Doctrine\DBAL\Schema\SqliteSchemaManager::listTableDetails ($tableName) : Doctrine\DBAL\Schema\Table

method Doctrine\DBAL\Schema\SqliteSchemaManager::__construct ($conn, $platform = null) : void

Constructor. Accepts the Connection instance to manage the schema for.

method Doctrine\DBAL\Schema\SqliteSchemaManager::getDatabasePlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

Returns the associated platform.

method Doctrine\DBAL\Schema\SqliteSchemaManager::tryMethod () : mixed

Tries any method on the schema manager. Normally a method throws an
exception when your DBMS doesn't support it or if an error occurs.
This method allows you to try and method on your SchemaManager
instance and will return false if it does not work or is not supported.


$result = $sm->tryMethod('dropView', 'view_name');

method Doctrine\DBAL\Schema\SqliteSchemaManager::listDatabases () : string[]

Lists the available databases for this connection.

method Doctrine\DBAL\Schema\SqliteSchemaManager::listNamespaceNames () : string[]

Returns a list of all namespaces in the current database.

method Doctrine\DBAL\Schema\SqliteSchemaManager::listSequences ($database = null) : Doctrine\DBAL\Schema\Sequence[]

Lists the available sequences for this connection.

method Doctrine\DBAL\Schema\SqliteSchemaManager::listTableColumns ($table, $database = null) : Doctrine\DBAL\Schema\Column[]

Lists the columns for a given table.

In contrast to other libraries and to the old version of Doctrine,
this column definition does try to contain the 'primary' field for
the reason that it is not portable across different RDBMS. Use
listTableIndexes($tableName) to retrieve the primary key
of a table. Where a RDBMS specifies more details, these are held
in the platformDetails array.

method Doctrine\DBAL\Schema\SqliteSchemaManager::listTableIndexes ($table) : Doctrine\DBAL\Schema\Index[]

Lists the indexes for a given table returning an array of Index instances.

Keys of the portable indexes list are all lower-cased.

method Doctrine\DBAL\Schema\SqliteSchemaManager::tablesExist ($tableNames) : bool

Returns true if all the given tables exist.

The usage of a string $tableNames is deprecated. Pass a one-element array instead.

method Doctrine\DBAL\Schema\SqliteSchemaManager::listTableNames () : string[]

Returns a list of all tables in the current database.

method Doctrine\DBAL\Schema\SqliteSchemaManager::filterAssetNames ($assetNames) : mixed[]

Filters asset names if they are configured to return only a subset of all
the found elements.

method Doctrine\DBAL\Schema\SqliteSchemaManager::getFilterSchemaAssetsExpression () : stringnull

method Doctrine\DBAL\Schema\SqliteSchemaManager::listTables () : Doctrine\DBAL\Schema\Table[]

Lists the tables for this connection.

method Doctrine\DBAL\Schema\SqliteSchemaManager::listViews () : Doctrine\DBAL\Schema\View[]

Lists the views this connection has.

method Doctrine\DBAL\Schema\SqliteSchemaManager::dropTable ($tableName) : void

Drops the given table.

method Doctrine\DBAL\Schema\SqliteSchemaManager::dropIndex ($index, $table) : void

Drops the index from the given table.

method Doctrine\DBAL\Schema\SqliteSchemaManager::dropConstraint ($constraint, $table) : void

Drops the constraint from the given table.

method Doctrine\DBAL\Schema\SqliteSchemaManager::dropSequence ($name) : void

Drops a sequence with a given name.

method Doctrine\DBAL\Schema\SqliteSchemaManager::dropView ($name) : void

Drops a view.

method Doctrine\DBAL\Schema\SqliteSchemaManager::createTable ($table) : void

Creates a new table.

method Doctrine\DBAL\Schema\SqliteSchemaManager::createSequence ($sequence) : void

Creates a new sequence.

method Doctrine\DBAL\Schema\SqliteSchemaManager::createConstraint ($constraint, $table) : void

Creates a constraint on a table.

method Doctrine\DBAL\Schema\SqliteSchemaManager::createIndex ($index, $table) : void

Creates a new index on a table.

method Doctrine\DBAL\Schema\SqliteSchemaManager::createView ($view) : void

Creates a new view.

method Doctrine\DBAL\Schema\SqliteSchemaManager::dropAndCreateConstraint ($constraint, $table) : void

Drops and creates a constraint.

method Doctrine\DBAL\Schema\SqliteSchemaManager::dropAndCreateIndex ($index, $table) : void

Drops and creates a new index on a table.

method Doctrine\DBAL\Schema\SqliteSchemaManager::dropAndCreateSequence ($sequence) : void

Drops and create a new sequence.

method Doctrine\DBAL\Schema\SqliteSchemaManager::dropAndCreateTable ($table) : void

Drops and creates a new table.

method Doctrine\DBAL\Schema\SqliteSchemaManager::dropAndCreateDatabase ($database) : void

Drops and creates a new database.

method Doctrine\DBAL\Schema\SqliteSchemaManager::dropAndCreateView ($view) : void

Drops and creates a new view.

method Doctrine\DBAL\Schema\SqliteSchemaManager::alterTable ($tableDiff) : void

Alters an existing tables schema.

method Doctrine\DBAL\Schema\SqliteSchemaManager::_getPortableDatabasesList ($databases) : string[]

method Doctrine\DBAL\Schema\SqliteSchemaManager::getPortableNamespacesList ($namespaces) : string[]

Converts a list of namespace names from the native DBMS data definition to a portable Doctrine definition.

method Doctrine\DBAL\Schema\SqliteSchemaManager::_getPortableDatabaseDefinition ($database) : mixed

method Doctrine\DBAL\Schema\SqliteSchemaManager::getPortableNamespaceDefinition ($namespace) : mixed

Converts a namespace definition from the native DBMS data definition to a portable Doctrine definition.

method Doctrine\DBAL\Schema\SqliteSchemaManager::_getPortableFunctionsList ($functions) : mixed[][]

method Doctrine\DBAL\Schema\SqliteSchemaManager::_getPortableFunctionDefinition ($function) : mixed

method Doctrine\DBAL\Schema\SqliteSchemaManager::_getPortableTriggersList ($triggers) : mixed[][]

method Doctrine\DBAL\Schema\SqliteSchemaManager::_getPortableTriggerDefinition ($trigger) : mixed

method Doctrine\DBAL\Schema\SqliteSchemaManager::_getPortableSequencesList ($sequences) : Doctrine\DBAL\Schema\Sequence[]

method Doctrine\DBAL\Schema\SqliteSchemaManager::_getPortableSequenceDefinition ($sequence) : Doctrine\DBAL\Schema\Sequence

method Doctrine\DBAL\Schema\SqliteSchemaManager::_getPortableTablesList ($tables) : string[]

method Doctrine\DBAL\Schema\SqliteSchemaManager::_getPortableUsersList ($users) : string[][]

method Doctrine\DBAL\Schema\SqliteSchemaManager::_getPortableUserDefinition ($user) : string[]

method Doctrine\DBAL\Schema\SqliteSchemaManager::_getPortableViewsList ($views) : Doctrine\DBAL\Schema\View[]

method Doctrine\DBAL\Schema\SqliteSchemaManager::_getPortableTableForeignKeyDefinition ($tableForeignKey) : Doctrine\DBAL\Schema\ForeignKeyConstraint

method Doctrine\DBAL\Schema\SqliteSchemaManager::_execSql ($sql) : void

method Doctrine\DBAL\Schema\SqliteSchemaManager::createSchema () : Doctrine\DBAL\Schema\Schema

Creates a schema instance for the current database.

method Doctrine\DBAL\Schema\SqliteSchemaManager::createSchemaConfig () : Doctrine\DBAL\Schema\SchemaConfig

Creates the configuration for this schema.

method Doctrine\DBAL\Schema\SqliteSchemaManager::getSchemaSearchPaths () : string[]

The search path for namespaces in the currently connected database.

The first entry is usually the default namespace in the Schema. All
further namespaces contain tables/sequences which can also be addressed
with a short, not full-qualified name.

For databases that don't support subschema/namespaces this method
returns the name of the currently connected database.

method Doctrine\DBAL\Schema\SqliteSchemaManager::extractDoctrineTypeFromComment ($comment, $currentType) : string

Given a table comment this method tries to extract a typehint for Doctrine Type, or returns
the type given as default.

method Doctrine\DBAL\Schema\SqliteSchemaManager::removeDoctrineTypeFromComment ($comment, $type) : stringnull

class Doctrine\DBAL\Schema::SQLServerSchemaManager

SQL Server Schema Manager.

property Doctrine\DBAL\Connection Doctrine\DBAL\Schema\SQLServerSchemaManager::_conn

Holds instance of the Doctrine connection for this schema manager.

property Doctrine\DBAL\Platforms\AbstractPlatform Doctrine\DBAL\Schema\SQLServerSchemaManager::_platform

Holds instance of the database platform used for this schema manager.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::dropDatabase ($database) : void

Drops a database.

NOTE: You can not drop the database this SchemaManager is currently connected to.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::_getPortableSequenceDefinition ($sequence) : Doctrine\DBAL\Schema\Sequence

method Doctrine\DBAL\Schema\SQLServerSchemaManager::_getPortableTableColumnDefinition ($tableColumn) : Doctrine\DBAL\Schema\Column

Gets Table Column Definition.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::_getPortableTableForeignKeysList ($tableForeignKeys) : Doctrine\DBAL\Schema\ForeignKeyConstraint[]

method Doctrine\DBAL\Schema\SQLServerSchemaManager::_getPortableTableIndexesList ($tableIndexRows, $tableName = null) : Doctrine\DBAL\Schema\Index[]

Aggregates and groups the index results according to the required data result.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::_getPortableTableForeignKeyDefinition ($tableForeignKey) : Doctrine\DBAL\Schema\ForeignKeyConstraint

method Doctrine\DBAL\Schema\SQLServerSchemaManager::_getPortableTableDefinition ($table) : string

method Doctrine\DBAL\Schema\SQLServerSchemaManager::_getPortableDatabaseDefinition ($database) : mixed

method Doctrine\DBAL\Schema\SQLServerSchemaManager::getPortableNamespaceDefinition ($namespace) : mixed

Converts a namespace definition from the native DBMS data definition to a portable Doctrine definition.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::_getPortableViewDefinition ($view) : Doctrine\DBAL\Schema\Viewfalse

method Doctrine\DBAL\Schema\SQLServerSchemaManager::listTableIndexes ($table) : Doctrine\DBAL\Schema\Index[]

Lists the indexes for a given table returning an array of Index instances.

Keys of the portable indexes list are all lower-cased.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::alterTable ($tableDiff) : void

Alters an existing tables schema.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::listTableDetails ($tableName) : Doctrine\DBAL\Schema\Table

method Doctrine\DBAL\Schema\SQLServerSchemaManager::__construct ($conn, $platform = null) : void

Constructor. Accepts the Connection instance to manage the schema for.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::getDatabasePlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

Returns the associated platform.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::tryMethod () : mixed

Tries any method on the schema manager. Normally a method throws an
exception when your DBMS doesn't support it or if an error occurs.
This method allows you to try and method on your SchemaManager
instance and will return false if it does not work or is not supported.


$result = $sm->tryMethod('dropView', 'view_name');

method Doctrine\DBAL\Schema\SQLServerSchemaManager::listDatabases () : string[]

Lists the available databases for this connection.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::listNamespaceNames () : string[]

Returns a list of all namespaces in the current database.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::listSequences ($database = null) : Doctrine\DBAL\Schema\Sequence[]

Lists the available sequences for this connection.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::listTableColumns ($table, $database = null) : Doctrine\DBAL\Schema\Column[]

Lists the columns for a given table.

In contrast to other libraries and to the old version of Doctrine,
this column definition does try to contain the 'primary' field for
the reason that it is not portable across different RDBMS. Use
listTableIndexes($tableName) to retrieve the primary key
of a table. Where a RDBMS specifies more details, these are held
in the platformDetails array.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::tablesExist ($tableNames) : bool

Returns true if all the given tables exist.

The usage of a string $tableNames is deprecated. Pass a one-element array instead.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::listTableNames () : string[]

Returns a list of all tables in the current database.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::filterAssetNames ($assetNames) : mixed[]

Filters asset names if they are configured to return only a subset of all
the found elements.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::getFilterSchemaAssetsExpression () : stringnull

method Doctrine\DBAL\Schema\SQLServerSchemaManager::listTables () : Doctrine\DBAL\Schema\Table[]

Lists the tables for this connection.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::listViews () : Doctrine\DBAL\Schema\View[]

Lists the views this connection has.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::listTableForeignKeys ($table, $database = null) : Doctrine\DBAL\Schema\ForeignKeyConstraint[]

Lists the foreign keys for the given table.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::dropTable ($tableName) : void

Drops the given table.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::dropIndex ($index, $table) : void

Drops the index from the given table.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::dropConstraint ($constraint, $table) : void

Drops the constraint from the given table.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::dropForeignKey ($foreignKey, $table) : void

Drops a foreign key from a table.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::dropSequence ($name) : void

Drops a sequence with a given name.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::dropView ($name) : void

Drops a view.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::createDatabase ($database) : void

Creates a new database.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::createTable ($table) : void

Creates a new table.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::createSequence ($sequence) : void

Creates a new sequence.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::createConstraint ($constraint, $table) : void

Creates a constraint on a table.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::createIndex ($index, $table) : void

Creates a new index on a table.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::createForeignKey ($foreignKey, $table) : void

Creates a new foreign key.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::createView ($view) : void

Creates a new view.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::dropAndCreateConstraint ($constraint, $table) : void

Drops and creates a constraint.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::dropAndCreateIndex ($index, $table) : void

Drops and creates a new index on a table.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::dropAndCreateForeignKey ($foreignKey, $table) : void

Drops and creates a new foreign key.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::dropAndCreateSequence ($sequence) : void

Drops and create a new sequence.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::dropAndCreateTable ($table) : void

Drops and creates a new table.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::dropAndCreateDatabase ($database) : void

Drops and creates a new database.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::dropAndCreateView ($view) : void

Drops and creates a new view.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::renameTable ($name, $newName) : void

Renames a given table to another name.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::_getPortableDatabasesList ($databases) : string[]

method Doctrine\DBAL\Schema\SQLServerSchemaManager::getPortableNamespacesList ($namespaces) : string[]

Converts a list of namespace names from the native DBMS data definition to a portable Doctrine definition.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::_getPortableFunctionsList ($functions) : mixed[][]

method Doctrine\DBAL\Schema\SQLServerSchemaManager::_getPortableFunctionDefinition ($function) : mixed

method Doctrine\DBAL\Schema\SQLServerSchemaManager::_getPortableTriggersList ($triggers) : mixed[][]

method Doctrine\DBAL\Schema\SQLServerSchemaManager::_getPortableTriggerDefinition ($trigger) : mixed

method Doctrine\DBAL\Schema\SQLServerSchemaManager::_getPortableSequencesList ($sequences) : Doctrine\DBAL\Schema\Sequence[]

method Doctrine\DBAL\Schema\SQLServerSchemaManager::_getPortableTableColumnList ($table, $database, $tableColumns) : Doctrine\DBAL\Schema\Column[]

Independent of the database the keys of the column list result are lowercased.

The name of the created column instance however is kept in its case.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::_getPortableTablesList ($tables) : string[]

method Doctrine\DBAL\Schema\SQLServerSchemaManager::_getPortableUsersList ($users) : string[][]

method Doctrine\DBAL\Schema\SQLServerSchemaManager::_getPortableUserDefinition ($user) : string[]

method Doctrine\DBAL\Schema\SQLServerSchemaManager::_getPortableViewsList ($views) : Doctrine\DBAL\Schema\View[]

method Doctrine\DBAL\Schema\SQLServerSchemaManager::_execSql ($sql) : void

method Doctrine\DBAL\Schema\SQLServerSchemaManager::createSchema () : Doctrine\DBAL\Schema\Schema

Creates a schema instance for the current database.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::createSchemaConfig () : Doctrine\DBAL\Schema\SchemaConfig

Creates the configuration for this schema.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::getSchemaSearchPaths () : string[]

The search path for namespaces in the currently connected database.

The first entry is usually the default namespace in the Schema. All
further namespaces contain tables/sequences which can also be addressed
with a short, not full-qualified name.

For databases that don't support subschema/namespaces this method
returns the name of the currently connected database.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::extractDoctrineTypeFromComment ($comment, $currentType) : string

Given a table comment this method tries to extract a typehint for Doctrine Type, or returns
the type given as default.

method Doctrine\DBAL\Schema\SQLServerSchemaManager::removeDoctrineTypeFromComment ($comment, $type) : stringnull

class Doctrine\DBAL\Schema::SQLAnywhereSchemaManager

SAP Sybase SQL Anywhere schema manager.

property Doctrine\DBAL\Connection Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::_conn

Holds instance of the Doctrine connection for this schema manager.

property Doctrine\DBAL\Platforms\AbstractPlatform Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::_platform

Holds instance of the database platform used for this schema manager.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::createDatabase ($database) : void

Creates a new database.

Starts a database after creation
as SQL Anywhere needs a database to be started
before it can be used.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::dropDatabase ($database) : void

Drops a database.

NOTE: You can not drop the database this SchemaManager is currently connected to.

Tries stopping a database before dropping
as SQL Anywhere needs a database to be stopped
before it can be dropped.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::startDatabase ($database) : void

Starts a database.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::stopDatabase ($database) : void

Stops a database.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::_getPortableDatabaseDefinition ($database) : mixed

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::_getPortableSequenceDefinition ($sequence) : Doctrine\DBAL\Schema\Sequence

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::_getPortableTableColumnDefinition ($tableColumn) : Doctrine\DBAL\Schema\Column

Gets Table Column Definition.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::_getPortableTableDefinition ($table) : string

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::_getPortableTableForeignKeyDefinition ($tableForeignKey) : Doctrine\DBAL\Schema\ForeignKeyConstraint

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::_getPortableTableForeignKeysList ($tableForeignKeys) : Doctrine\DBAL\Schema\ForeignKeyConstraint[]

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::_getPortableTableIndexesList ($tableIndexRows, $tableName = null) : Doctrine\DBAL\Schema\Index[]

Aggregates and groups the index results according to the required data result.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::_getPortableViewDefinition ($view) : Doctrine\DBAL\Schema\Viewfalse

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::__construct ($conn, $platform = null) : void

Constructor. Accepts the Connection instance to manage the schema for.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::getDatabasePlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

Returns the associated platform.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::tryMethod () : mixed

Tries any method on the schema manager. Normally a method throws an
exception when your DBMS doesn't support it or if an error occurs.
This method allows you to try and method on your SchemaManager
instance and will return false if it does not work or is not supported.


$result = $sm->tryMethod('dropView', 'view_name');

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::listDatabases () : string[]

Lists the available databases for this connection.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::listNamespaceNames () : string[]

Returns a list of all namespaces in the current database.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::listSequences ($database = null) : Doctrine\DBAL\Schema\Sequence[]

Lists the available sequences for this connection.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::listTableColumns ($table, $database = null) : Doctrine\DBAL\Schema\Column[]

Lists the columns for a given table.

In contrast to other libraries and to the old version of Doctrine,
this column definition does try to contain the 'primary' field for
the reason that it is not portable across different RDBMS. Use
listTableIndexes($tableName) to retrieve the primary key
of a table. Where a RDBMS specifies more details, these are held
in the platformDetails array.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::listTableIndexes ($table) : Doctrine\DBAL\Schema\Index[]

Lists the indexes for a given table returning an array of Index instances.

Keys of the portable indexes list are all lower-cased.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::tablesExist ($tableNames) : bool

Returns true if all the given tables exist.

The usage of a string $tableNames is deprecated. Pass a one-element array instead.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::listTableNames () : string[]

Returns a list of all tables in the current database.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::filterAssetNames ($assetNames) : mixed[]

Filters asset names if they are configured to return only a subset of all
the found elements.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::getFilterSchemaAssetsExpression () : stringnull

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::listTables () : Doctrine\DBAL\Schema\Table[]

Lists the tables for this connection.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::listTableDetails ($tableName) : Doctrine\DBAL\Schema\Table

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::listViews () : Doctrine\DBAL\Schema\View[]

Lists the views this connection has.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::listTableForeignKeys ($table, $database = null) : Doctrine\DBAL\Schema\ForeignKeyConstraint[]

Lists the foreign keys for the given table.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::dropTable ($tableName) : void

Drops the given table.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::dropIndex ($index, $table) : void

Drops the index from the given table.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::dropConstraint ($constraint, $table) : void

Drops the constraint from the given table.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::dropForeignKey ($foreignKey, $table) : void

Drops a foreign key from a table.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::dropSequence ($name) : void

Drops a sequence with a given name.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::dropView ($name) : void

Drops a view.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::createTable ($table) : void

Creates a new table.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::createSequence ($sequence) : void

Creates a new sequence.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::createConstraint ($constraint, $table) : void

Creates a constraint on a table.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::createIndex ($index, $table) : void

Creates a new index on a table.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::createForeignKey ($foreignKey, $table) : void

Creates a new foreign key.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::createView ($view) : void

Creates a new view.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::dropAndCreateConstraint ($constraint, $table) : void

Drops and creates a constraint.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::dropAndCreateIndex ($index, $table) : void

Drops and creates a new index on a table.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::dropAndCreateForeignKey ($foreignKey, $table) : void

Drops and creates a new foreign key.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::dropAndCreateSequence ($sequence) : void

Drops and create a new sequence.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::dropAndCreateTable ($table) : void

Drops and creates a new table.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::dropAndCreateDatabase ($database) : void

Drops and creates a new database.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::dropAndCreateView ($view) : void

Drops and creates a new view.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::alterTable ($tableDiff) : void

Alters an existing tables schema.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::renameTable ($name, $newName) : void

Renames a given table to another name.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::_getPortableDatabasesList ($databases) : string[]

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::getPortableNamespacesList ($namespaces) : string[]

Converts a list of namespace names from the native DBMS data definition to a portable Doctrine definition.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::getPortableNamespaceDefinition ($namespace) : mixed

Converts a namespace definition from the native DBMS data definition to a portable Doctrine definition.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::_getPortableFunctionsList ($functions) : mixed[][]

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::_getPortableFunctionDefinition ($function) : mixed

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::_getPortableTriggersList ($triggers) : mixed[][]

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::_getPortableTriggerDefinition ($trigger) : mixed

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::_getPortableSequencesList ($sequences) : Doctrine\DBAL\Schema\Sequence[]

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::_getPortableTableColumnList ($table, $database, $tableColumns) : Doctrine\DBAL\Schema\Column[]

Independent of the database the keys of the column list result are lowercased.

The name of the created column instance however is kept in its case.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::_getPortableTablesList ($tables) : string[]

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::_getPortableUsersList ($users) : string[][]

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::_getPortableUserDefinition ($user) : string[]

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::_getPortableViewsList ($views) : Doctrine\DBAL\Schema\View[]

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::_execSql ($sql) : void

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::createSchema () : Doctrine\DBAL\Schema\Schema

Creates a schema instance for the current database.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::createSchemaConfig () : Doctrine\DBAL\Schema\SchemaConfig

Creates the configuration for this schema.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::getSchemaSearchPaths () : string[]

The search path for namespaces in the currently connected database.

The first entry is usually the default namespace in the Schema. All
further namespaces contain tables/sequences which can also be addressed
with a short, not full-qualified name.

For databases that don't support subschema/namespaces this method
returns the name of the currently connected database.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::extractDoctrineTypeFromComment ($comment, $currentType) : string

Given a table comment this method tries to extract a typehint for Doctrine Type, or returns
the type given as default.

method Doctrine\DBAL\Schema\SQLAnywhereSchemaManager::removeDoctrineTypeFromComment ($comment, $type) : stringnull

class Doctrine\DBAL\Schema::View

Representation of a Database View.

property string Doctrine\DBAL\Schema\View::_name

property stringnull Doctrine\DBAL\Schema\View::_namespace

Namespace of the asset. If none isset the default namespace is assumed.

property bool Doctrine\DBAL\Schema\View::_quoted

method Doctrine\DBAL\Schema\View::__construct ($name, $sql) : void

method Doctrine\DBAL\Schema\View::getSql () : string

method Doctrine\DBAL\Schema\View::_setName ($name) : void

Sets the name of this asset.

method Doctrine\DBAL\Schema\View::isInDefaultNamespace ($defaultNamespaceName) : bool

Is this asset in the default namespace?

method Doctrine\DBAL\Schema\View::getNamespaceName () : stringnull

Gets the namespace name of this asset.

If NULL is returned this means the default namespace is used.

method Doctrine\DBAL\Schema\View::getShortestName ($defaultNamespaceName) : string

The shortest name is stripped of the default namespace. All other
namespaced elements are returned as full-qualified names.

method Doctrine\DBAL\Schema\View::getFullQualifiedName ($defaultNamespaceName) : string

The normalized name is full-qualified and lowerspaced. Lowerspacing is
actually wrong, but we have to do it to keep our sanity. If you are
using database objects that only differentiate in the casing (FOO vs
Foo) then you will NOT be able to use Doctrine Schema abstraction.

Every non-namespaced element is prefixed with the default namespace
name which is passed as argument to this method.

method Doctrine\DBAL\Schema\View::isQuoted () : bool

Checks if this asset's name is quoted.

method Doctrine\DBAL\Schema\View::isIdentifierQuoted ($identifier) : bool

Checks if this identifier is quoted.

method Doctrine\DBAL\Schema\View::trimQuotes ($identifier) : string

Trim quotes from the identifier.

method Doctrine\DBAL\Schema\View::getName () : string

Returns the name of this schema asset.

method Doctrine\DBAL\Schema\View::getQuotedName ($platform) : string

Gets the quoted representation of this asset but only if it was defined with one. Otherwise
return the plain unquoted value as inserted.

method Doctrine\DBAL\Schema\View::_generateIdentifierName ($columnNames, $prefix = "", $maxSize = 30) : string

Generates an identifier from a list of column names obeying a certain string length.

This is especially important for Oracle, since it does not allow identifiers larger than 30 chars,
however building idents automatically for foreign keys, composite keys or such can easily create
very long names.

class Doctrine\DBAL\Schema::SchemaConfig

Configuration for a Schema.

property bool Doctrine\DBAL\Schema\SchemaConfig::hasExplicitForeignKeyIndexes

property int Doctrine\DBAL\Schema\SchemaConfig::maxIdentifierLength

property string Doctrine\DBAL\Schema\SchemaConfig::name

property mixed[] Doctrine\DBAL\Schema\SchemaConfig::defaultTableOptions

method Doctrine\DBAL\Schema\SchemaConfig::hasExplicitForeignKeyIndexes () : bool

method Doctrine\DBAL\Schema\SchemaConfig::setExplicitForeignKeyIndexes ($flag) : void

method Doctrine\DBAL\Schema\SchemaConfig::setMaxIdentifierLength ($length) : void

method Doctrine\DBAL\Schema\SchemaConfig::getMaxIdentifierLength () : int

method Doctrine\DBAL\Schema\SchemaConfig::getName () : string

Gets the default namespace of schema objects.

method Doctrine\DBAL\Schema\SchemaConfig::setName ($name) : void

Sets the default namespace name of schema objects.

method Doctrine\DBAL\Schema\SchemaConfig::getDefaultTableOptions () : mixed[]

Gets the default options that are passed to Table instances created with
Schema#createTable().

method Doctrine\DBAL\Schema\SchemaConfig::setDefaultTableOptions ($defaultTableOptions) : void

class Doctrine\DBAL\Schema::Comparator

Compares two Schemas and return an instance of SchemaDiff.

method Doctrine\DBAL\Schema\Comparator::compareSchemas ($fromSchema, $toSchema) : Doctrine\DBAL\Schema\SchemaDiff

method Doctrine\DBAL\Schema\Comparator::compare ($fromSchema, $toSchema) : Doctrine\DBAL\Schema\SchemaDiff

Returns a SchemaDiff object containing the differences between the schemas $fromSchema and $toSchema.

The returned differences are returned in such a way that they contain the
operations to change the schema stored in $fromSchema to the schema that is
stored in $toSchema.

method Doctrine\DBAL\Schema\Comparator::diffSequence ($sequence1, $sequence2) : bool

method Doctrine\DBAL\Schema\Comparator::diffTable ($table1, $table2) : Doctrine\DBAL\Schema\TableDifffalse

Returns the difference between the tables $table1 and $table2.

If there are no differences this method returns the boolean false.

method Doctrine\DBAL\Schema\Comparator::diffForeignKey ($key1, $key2) : bool

method Doctrine\DBAL\Schema\Comparator::diffColumn ($column1, $column2) : string[]

Returns the difference between the fields $field1 and $field2.

If there are differences this method returns $field2, otherwise the
boolean false.

method Doctrine\DBAL\Schema\Comparator::diffIndex ($index1, $index2) : bool

Finds the difference between the indexes $index1 and $index2.

Compares $index1 with $index2 and returns $index2 if there are any
differences or false in case there are no differences.

class Doctrine\DBAL\Schema::SchemaDiff

Schema Diff.

property Doctrine\DBAL\Schema\Schemanull Doctrine\DBAL\Schema\SchemaDiff::fromSchema

property string[] Doctrine\DBAL\Schema\SchemaDiff::newNamespaces

All added namespaces.

property string[] Doctrine\DBAL\Schema\SchemaDiff::removedNamespaces

All removed namespaces.

property Doctrine\DBAL\Schema\Table[] Doctrine\DBAL\Schema\SchemaDiff::newTables

All added tables.

property Doctrine\DBAL\Schema\TableDiff[] Doctrine\DBAL\Schema\SchemaDiff::changedTables

All changed tables.

property Doctrine\DBAL\Schema\Table[] Doctrine\DBAL\Schema\SchemaDiff::removedTables

All removed tables.

property Doctrine\DBAL\Schema\Sequence[] Doctrine\DBAL\Schema\SchemaDiff::newSequences

property Doctrine\DBAL\Schema\Sequence[] Doctrine\DBAL\Schema\SchemaDiff::changedSequences

property Doctrine\DBAL\Schema\Sequence[] Doctrine\DBAL\Schema\SchemaDiff::removedSequences

property Doctrine\DBAL\Schema\ForeignKeyConstraint[] Doctrine\DBAL\Schema\SchemaDiff::orphanedForeignKeys

method Doctrine\DBAL\Schema\SchemaDiff::__construct ($newTables = [], $changedTables = [], $removedTables = [], $fromSchema = null) : void

Constructs an SchemaDiff object.

method Doctrine\DBAL\Schema\SchemaDiff::toSaveSql ($platform) : string[]

The to save sql mode ensures that the following things don't happen:

  1. Tables are deleted
  2. Sequences are deleted
  3. Foreign Keys which reference tables that would otherwise be deleted.

This way it is ensured that assets are deleted which might not be relevant to the metadata schema at all.

method Doctrine\DBAL\Schema\SchemaDiff::toSql ($platform) : string[]

method Doctrine\DBAL\Schema\SchemaDiff::_toSql ($platform, $saveMode = false) : string[]

interface Doctrine\DBAL\Schema::Constraint

Marker interface for constraints.

method Doctrine\DBAL\Schema\Constraint::getName () : string

method Doctrine\DBAL\Schema\Constraint::getQuotedName ($platform) : string

method Doctrine\DBAL\Schema\Constraint::getColumns () : string[]

Returns the names of the referencing table columns
the constraint is associated with.

method Doctrine\DBAL\Schema\Constraint::getQuotedColumns ($platform) : string[]

Returns the quoted representation of the column names
the constraint is associated with.

But only if they were defined with one or a column name
is a keyword reserved by the platform.
Otherwise the plain unquoted value as inserted is returned.

namespace Doctrine\DBAL\Types

class Doctrine\DBAL\Types::Type

The base class for so-called Doctrine mapping types.

A Type object is obtained by calling the static Doctrine\DBAL\Types\Type::getType() method.

classconstant string Doctrine\DBAL\Types\Type::BIGINT

classconstant string Doctrine\DBAL\Types\Type::BINARY

classconstant string Doctrine\DBAL\Types\Type::BLOB

classconstant string Doctrine\DBAL\Types\Type::BOOLEAN

classconstant string Doctrine\DBAL\Types\Type::DATE

classconstant string Doctrine\DBAL\Types\Type::DATE_IMMUTABLE

classconstant string Doctrine\DBAL\Types\Type::DATEINTERVAL

classconstant string Doctrine\DBAL\Types\Type::DATETIME

classconstant string Doctrine\DBAL\Types\Type::DATETIME_IMMUTABLE

classconstant string Doctrine\DBAL\Types\Type::DATETIMETZ

classconstant string Doctrine\DBAL\Types\Type::DATETIMETZ_IMMUTABLE

classconstant string Doctrine\DBAL\Types\Type::DECIMAL

classconstant string Doctrine\DBAL\Types\Type::FLOAT

classconstant string Doctrine\DBAL\Types\Type::GUID

classconstant string Doctrine\DBAL\Types\Type::INTEGER

classconstant string Doctrine\DBAL\Types\Type::JSON

classconstant string Doctrine\DBAL\Types\Type::JSON_ARRAY

classconstant string Doctrine\DBAL\Types\Type::OBJECT

classconstant string Doctrine\DBAL\Types\Type::SIMPLE_ARRAY

classconstant string Doctrine\DBAL\Types\Type::SMALLINT

classconstant string Doctrine\DBAL\Types\Type::STRING

classconstant string Doctrine\DBAL\Types\Type::TARRAY

classconstant string Doctrine\DBAL\Types\Type::TEXT

classconstant string Doctrine\DBAL\Types\Type::TIME

classconstant string Doctrine\DBAL\Types\Type::TIME_IMMUTABLE

method Doctrine\DBAL\Types\Type::__construct () : void

method Doctrine\DBAL\Types\Type::convertToDatabaseValue ($value, $platform) : mixed

Converts a value from its PHP representation to its database representation
of this type.

method Doctrine\DBAL\Types\Type::convertToPHPValue ($value, $platform) : mixed

Converts a value from its database representation to its PHP representation
of this type.

method Doctrine\DBAL\Types\Type::getDefaultLength ($platform) : intnull

Gets the default length of this type.

method Doctrine\DBAL\Types\Type::getSQLDeclaration ($fieldDeclaration, $platform) : string

Gets the SQL declaration snippet for a field of this type.

method Doctrine\DBAL\Types\Type::getName () : string

Gets the name of this type.

method Doctrine\DBAL\Types\Type::getTypeRegistry () : Doctrine\DBAL\Types\TypeRegistry

method Doctrine\DBAL\Types\Type::getType ($name) : Doctrine\DBAL\Types\Type

Factory method to create type instances.
Type instances are implemented as flyweights.

method Doctrine\DBAL\Types\Type::addType ($name, $className) : void

Adds a custom type to the type map.

method Doctrine\DBAL\Types\Type::hasType ($name) : bool

Checks if exists support for a type.

method Doctrine\DBAL\Types\Type::overrideType ($name, $className) : void

Overrides an already defined type to use a different implementation.

method Doctrine\DBAL\Types\Type::getBindingType () : int

Gets the (preferred) binding type for values of this type that
can be used when binding parameters to prepared statements.

This method should return one of the Doctrine\DBAL\ParameterType constants.

method Doctrine\DBAL\Types\Type::getTypesMap () : string[]

Gets the types array map which holds all registered types and the corresponding
type class

method Doctrine\DBAL\Types\Type::__toString () : string

method Doctrine\DBAL\Types\Type::canRequireSQLConversion () : bool

Does working with this column require SQL conversion functions?

This is a metadata function that is required for example in the ORM.
Usage of convertToDatabaseValueSQL and
convertToPHPValueSQL works for any type and mostly
does nothing. This method can additionally be used for optimization purposes.

method Doctrine\DBAL\Types\Type::convertToDatabaseValueSQL ($sqlExpr, $platform) : string

Modifies the SQL expression (identifier, parameter) to convert to a database value.

method Doctrine\DBAL\Types\Type::convertToPHPValueSQL ($sqlExpr, $platform) : string

Modifies the SQL expression (identifier, parameter) to convert to a PHP value.

method Doctrine\DBAL\Types\Type::getMappedDatabaseTypes ($platform) : string[]

Gets an array of database types that map to this Doctrine type.

method Doctrine\DBAL\Types\Type::requiresSQLCommentHint ($platform) : bool

If this Doctrine Type maps to an already mapped database type,
reverse schema engineering can't tell them apart. You need to mark
one of those types as commented, which will have Doctrine use an SQL
comment to typehint the actual Doctrine Type.

class Doctrine\DBAL\Types::BinaryType

Type that maps ab SQL BINARY/VARBINARY to a PHP resource stream.

classconstant string Doctrine\DBAL\Types\BinaryType::BIGINT

classconstant string Doctrine\DBAL\Types\BinaryType::BINARY

classconstant string Doctrine\DBAL\Types\BinaryType::BLOB

classconstant string Doctrine\DBAL\Types\BinaryType::BOOLEAN

classconstant string Doctrine\DBAL\Types\BinaryType::DATE

classconstant string Doctrine\DBAL\Types\BinaryType::DATE_IMMUTABLE

classconstant string Doctrine\DBAL\Types\BinaryType::DATEINTERVAL

classconstant string Doctrine\DBAL\Types\BinaryType::DATETIME

classconstant string Doctrine\DBAL\Types\BinaryType::DATETIME_IMMUTABLE

classconstant string Doctrine\DBAL\Types\BinaryType::DATETIMETZ

classconstant string Doctrine\DBAL\Types\BinaryType::DATETIMETZ_IMMUTABLE

classconstant string Doctrine\DBAL\Types\BinaryType::DECIMAL

classconstant string Doctrine\DBAL\Types\BinaryType::FLOAT

classconstant string Doctrine\DBAL\Types\BinaryType::GUID

classconstant string Doctrine\DBAL\Types\BinaryType::INTEGER

classconstant string Doctrine\DBAL\Types\BinaryType::JSON

classconstant string Doctrine\DBAL\Types\BinaryType::JSON_ARRAY

classconstant string Doctrine\DBAL\Types\BinaryType::OBJECT

classconstant string Doctrine\DBAL\Types\BinaryType::SIMPLE_ARRAY

classconstant string Doctrine\DBAL\Types\BinaryType::SMALLINT

classconstant string Doctrine\DBAL\Types\BinaryType::STRING

classconstant string Doctrine\DBAL\Types\BinaryType::TARRAY

classconstant string Doctrine\DBAL\Types\BinaryType::TEXT

classconstant string Doctrine\DBAL\Types\BinaryType::TIME

classconstant string Doctrine\DBAL\Types\BinaryType::TIME_IMMUTABLE

method Doctrine\DBAL\Types\BinaryType::getSQLDeclaration ($fieldDeclaration, $platform) : string

Gets the SQL declaration snippet for a field of this type.

method Doctrine\DBAL\Types\BinaryType::convertToPHPValue ($value, $platform) : mixed

Converts a value from its database representation to its PHP representation
of this type.

method Doctrine\DBAL\Types\BinaryType::getName () : string

Gets the name of this type.

method Doctrine\DBAL\Types\BinaryType::getBindingType () : int

Gets the (preferred) binding type for values of this type that
can be used when binding parameters to prepared statements.

This method should return one of the Doctrine\DBAL\ParameterType constants.

method Doctrine\DBAL\Types\BinaryType::__construct () : void

method Doctrine\DBAL\Types\BinaryType::convertToDatabaseValue ($value, $platform) : mixed

Converts a value from its PHP representation to its database representation
of this type.

method Doctrine\DBAL\Types\BinaryType::getDefaultLength ($platform) : intnull

Gets the default length of this type.

method Doctrine\DBAL\Types\BinaryType::getTypeRegistry () : Doctrine\DBAL\Types\TypeRegistry

method Doctrine\DBAL\Types\BinaryType::getType ($name) : Doctrine\DBAL\Types\Type

Factory method to create type instances.
Type instances are implemented as flyweights.

method Doctrine\DBAL\Types\BinaryType::addType ($name, $className) : void

Adds a custom type to the type map.

method Doctrine\DBAL\Types\BinaryType::hasType ($name) : bool

Checks if exists support for a type.

method Doctrine\DBAL\Types\BinaryType::overrideType ($name, $className) : void

Overrides an already defined type to use a different implementation.

method Doctrine\DBAL\Types\BinaryType::getTypesMap () : string[]

Gets the types array map which holds all registered types and the corresponding
type class

method Doctrine\DBAL\Types\BinaryType::__toString () : string

method Doctrine\DBAL\Types\BinaryType::canRequireSQLConversion () : bool

Does working with this column require SQL conversion functions?

This is a metadata function that is required for example in the ORM.
Usage of convertToDatabaseValueSQL and
convertToPHPValueSQL works for any type and mostly
does nothing. This method can additionally be used for optimization purposes.

method Doctrine\DBAL\Types\BinaryType::convertToDatabaseValueSQL ($sqlExpr, $platform) : string

Modifies the SQL expression (identifier, parameter) to convert to a database value.

method Doctrine\DBAL\Types\BinaryType::convertToPHPValueSQL ($sqlExpr, $platform) : string

Modifies the SQL expression (identifier, parameter) to convert to a PHP value.

method Doctrine\DBAL\Types\BinaryType::getMappedDatabaseTypes ($platform) : string[]

Gets an array of database types that map to this Doctrine type.

method Doctrine\DBAL\Types\BinaryType::requiresSQLCommentHint ($platform) : bool

If this Doctrine Type maps to an already mapped database type,
reverse schema engineering can't tell them apart. You need to mark
one of those types as commented, which will have Doctrine use an SQL
comment to typehint the actual Doctrine Type.

class Doctrine\DBAL\Types::Types

Default built-in types provided by Doctrine DBAL.

classconstant string Doctrine\DBAL\Types\Types::ARRAY

classconstant string Doctrine\DBAL\Types\Types::BIGINT

classconstant string Doctrine\DBAL\Types\Types::BINARY

classconstant string Doctrine\DBAL\Types\Types::BLOB

classconstant string Doctrine\DBAL\Types\Types::BOOLEAN

classconstant string Doctrine\DBAL\Types\Types::DATE_MUTABLE

classconstant string Doctrine\DBAL\Types\Types::DATE_IMMUTABLE

classconstant string Doctrine\DBAL\Types\Types::DATEINTERVAL

classconstant string Doctrine\DBAL\Types\Types::DATETIME_MUTABLE

classconstant string Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE

classconstant string Doctrine\DBAL\Types\Types::DATETIMETZ_MUTABLE

classconstant string Doctrine\DBAL\Types\Types::DATETIMETZ_IMMUTABLE

classconstant string Doctrine\DBAL\Types\Types::DECIMAL

classconstant string Doctrine\DBAL\Types\Types::FLOAT

classconstant string Doctrine\DBAL\Types\Types::GUID

classconstant string Doctrine\DBAL\Types\Types::INTEGER

classconstant string Doctrine\DBAL\Types\Types::JSON

classconstant string Doctrine\DBAL\Types\Types::OBJECT

classconstant string Doctrine\DBAL\Types\Types::SIMPLE_ARRAY

classconstant string Doctrine\DBAL\Types\Types::SMALLINT

classconstant string Doctrine\DBAL\Types\Types::STRING

classconstant string Doctrine\DBAL\Types\Types::TEXT

classconstant string Doctrine\DBAL\Types\Types::TIME_MUTABLE

classconstant string Doctrine\DBAL\Types\Types::TIME_IMMUTABLE

classconstant string Doctrine\DBAL\Types\Types::JSON_ARRAY

class Doctrine\DBAL\Types::BlobType

Type that maps an SQL BLOB to a PHP resource stream.

classconstant string Doctrine\DBAL\Types\BlobType::BIGINT

classconstant string Doctrine\DBAL\Types\BlobType::BINARY

classconstant string Doctrine\DBAL\Types\BlobType::BLOB

classconstant string Doctrine\DBAL\Types\BlobType::BOOLEAN

classconstant string Doctrine\DBAL\Types\BlobType::DATE

classconstant string Doctrine\DBAL\Types\BlobType::DATE_IMMUTABLE

classconstant string Doctrine\DBAL\Types\BlobType::DATEINTERVAL

classconstant string Doctrine\DBAL\Types\BlobType::DATETIME

classconstant string Doctrine\DBAL\Types\BlobType::DATETIME_IMMUTABLE

classconstant string Doctrine\DBAL\Types\BlobType::DATETIMETZ

classconstant string Doctrine\DBAL\Types\BlobType::DATETIMETZ_IMMUTABLE

classconstant string Doctrine\DBAL\Types\BlobType::DECIMAL

classconstant string Doctrine\DBAL\Types\BlobType::FLOAT

classconstant string Doctrine\DBAL\Types\BlobType::GUID

classconstant string Doctrine\DBAL\Types\BlobType::INTEGER

classconstant string Doctrine\DBAL\Types\BlobType::JSON

classconstant string Doctrine\DBAL\Types\BlobType::JSON_ARRAY

classconstant string Doctrine\DBAL\Types\BlobType::OBJECT

classconstant string Doctrine\DBAL\Types\BlobType::SIMPLE_ARRAY

classconstant string Doctrine\DBAL\Types\BlobType::SMALLINT

classconstant string Doctrine\DBAL\Types\BlobType::STRING

classconstant string Doctrine\DBAL\Types\BlobType::TARRAY

classconstant string Doctrine\DBAL\Types\BlobType::TEXT

classconstant string Doctrine\DBAL\Types\BlobType::TIME

classconstant string Doctrine\DBAL\Types\BlobType::TIME_IMMUTABLE

method Doctrine\DBAL\Types\BlobType::getSQLDeclaration ($fieldDeclaration, $platform) : string

Gets the SQL declaration snippet for a field of this type.

method Doctrine\DBAL\Types\BlobType::convertToPHPValue ($value, $platform) : mixed

Converts a value from its database representation to its PHP representation
of this type.

method Doctrine\DBAL\Types\BlobType::getName () : string

Gets the name of this type.

method Doctrine\DBAL\Types\BlobType::getBindingType () : int

Gets the (preferred) binding type for values of this type that
can be used when binding parameters to prepared statements.

This method should return one of the Doctrine\DBAL\ParameterType constants.

method Doctrine\DBAL\Types\BlobType::__construct () : void

method Doctrine\DBAL\Types\BlobType::convertToDatabaseValue ($value, $platform) : mixed

Converts a value from its PHP representation to its database representation
of this type.

method Doctrine\DBAL\Types\BlobType::getDefaultLength ($platform) : intnull

Gets the default length of this type.

method Doctrine\DBAL\Types\BlobType::getTypeRegistry () : Doctrine\DBAL\Types\TypeRegistry

method Doctrine\DBAL\Types\BlobType::getType ($name) : Doctrine\DBAL\Types\Type

Factory method to create type instances.
Type instances are implemented as flyweights.

method Doctrine\DBAL\Types\BlobType::addType ($name, $className) : void

Adds a custom type to the type map.

method Doctrine\DBAL\Types\BlobType::hasType ($name) : bool

Checks if exists support for a type.

method Doctrine\DBAL\Types\BlobType::overrideType ($name, $className) : void

Overrides an already defined type to use a different implementation.

method Doctrine\DBAL\Types\BlobType::getTypesMap () : string[]

Gets the types array map which holds all registered types and the corresponding
type class

method Doctrine\DBAL\Types\BlobType::__toString () : string

method Doctrine\DBAL\Types\BlobType::canRequireSQLConversion () : bool

Does working with this column require SQL conversion functions?

This is a metadata function that is required for example in the ORM.
Usage of convertToDatabaseValueSQL and
convertToPHPValueSQL works for any type and mostly
does nothing. This method can additionally be used for optimization purposes.

method Doctrine\DBAL\Types\BlobType::convertToDatabaseValueSQL ($sqlExpr, $platform) : string

Modifies the SQL expression (identifier, parameter) to convert to a database value.

method Doctrine\DBAL\Types\BlobType::convertToPHPValueSQL ($sqlExpr, $platform) : string

Modifies the SQL expression (identifier, parameter) to convert to a PHP value.

method Doctrine\DBAL\Types\BlobType::getMappedDatabaseTypes ($platform) : string[]

Gets an array of database types that map to this Doctrine type.

method Doctrine\DBAL\Types\BlobType::requiresSQLCommentHint ($platform) : bool

If this Doctrine Type maps to an already mapped database type,
reverse schema engineering can't tell them apart. You need to mark
one of those types as commented, which will have Doctrine use an SQL
comment to typehint the actual Doctrine Type.

class Doctrine\DBAL\Types::TextType

Type that maps an SQL CLOB to a PHP string.

classconstant string Doctrine\DBAL\Types\TextType::BIGINT

classconstant string Doctrine\DBAL\Types\TextType::BINARY

classconstant string Doctrine\DBAL\Types\TextType::BLOB

classconstant string Doctrine\DBAL\Types\TextType::BOOLEAN

classconstant string Doctrine\DBAL\Types\TextType::DATE

classconstant string Doctrine\DBAL\Types\TextType::DATE_IMMUTABLE

classconstant string Doctrine\DBAL\Types\TextType::DATEINTERVAL

classconstant string Doctrine\DBAL\Types\TextType::DATETIME

classconstant string Doctrine\DBAL\Types\TextType::DATETIME_IMMUTABLE

classconstant string Doctrine\DBAL\Types\TextType::DATETIMETZ

classconstant string Doctrine\DBAL\Types\TextType::DATETIMETZ_IMMUTABLE

classconstant string Doctrine\DBAL\Types\TextType::DECIMAL

classconstant string Doctrine\DBAL\Types\TextType::FLOAT

classconstant string Doctrine\DBAL\Types\TextType::GUID

classconstant string Doctrine\DBAL\Types\TextType::INTEGER

classconstant string Doctrine\DBAL\Types\TextType::JSON

classconstant string Doctrine\DBAL\Types\TextType::JSON_ARRAY

classconstant string Doctrine\DBAL\Types\TextType::OBJECT

classconstant string Doctrine\DBAL\Types\TextType::SIMPLE_ARRAY

classconstant string Doctrine\DBAL\Types\TextType::SMALLINT

classconstant string Doctrine\DBAL\Types\TextType::STRING

classconstant string Doctrine\DBAL\Types\TextType::TARRAY

classconstant string Doctrine\DBAL\Types\TextType::TEXT

classconstant string Doctrine\DBAL\Types\TextType::TIME

classconstant string Doctrine\DBAL\Types\TextType::TIME_IMMUTABLE

method Doctrine\DBAL\Types\TextType::getSQLDeclaration ($fieldDeclaration, $platform) : string

Gets the SQL declaration snippet for a field of this type.

method Doctrine\DBAL\Types\TextType::convertToPHPValue ($value, $platform) : mixed

Converts a value from its database representation to its PHP representation
of this type.

method Doctrine\DBAL\Types\TextType::getName () : string

Gets the name of this type.

method Doctrine\DBAL\Types\TextType::__construct () : void

method Doctrine\DBAL\Types\TextType::convertToDatabaseValue ($value, $platform) : mixed

Converts a value from its PHP representation to its database representation
of this type.

method Doctrine\DBAL\Types\TextType::getDefaultLength ($platform) : intnull

Gets the default length of this type.

method Doctrine\DBAL\Types\TextType::getTypeRegistry () : Doctrine\DBAL\Types\TypeRegistry

method Doctrine\DBAL\Types\TextType::getType ($name) : Doctrine\DBAL\Types\Type

Factory method to create type instances.
Type instances are implemented as flyweights.

method Doctrine\DBAL\Types\TextType::addType ($name, $className) : void

Adds a custom type to the type map.

method Doctrine\DBAL\Types\TextType::hasType ($name) : bool

Checks if exists support for a type.

method Doctrine\DBAL\Types\TextType::overrideType ($name, $className) : void

Overrides an already defined type to use a different implementation.

method Doctrine\DBAL\Types\TextType::getBindingType () : int

Gets the (preferred) binding type for values of this type that
can be used when binding parameters to prepared statements.

This method should return one of the Doctrine\DBAL\ParameterType constants.

method Doctrine\DBAL\Types\TextType::getTypesMap () : string[]

Gets the types array map which holds all registered types and the corresponding
type class

method Doctrine\DBAL\Types\TextType::__toString () : string

method Doctrine\DBAL\Types\TextType::canRequireSQLConversion () : bool

Does working with this column require SQL conversion functions?

This is a metadata function that is required for example in the ORM.
Usage of convertToDatabaseValueSQL and
convertToPHPValueSQL works for any type and mostly
does nothing. This method can additionally be used for optimization purposes.

method Doctrine\DBAL\Types\TextType::convertToDatabaseValueSQL ($sqlExpr, $platform) : string

Modifies the SQL expression (identifier, parameter) to convert to a database value.

method Doctrine\DBAL\Types\TextType::convertToPHPValueSQL ($sqlExpr, $platform) : string

Modifies the SQL expression (identifier, parameter) to convert to a PHP value.

method Doctrine\DBAL\Types\TextType::getMappedDatabaseTypes ($platform) : string[]

Gets an array of database types that map to this Doctrine type.

method Doctrine\DBAL\Types\TextType::requiresSQLCommentHint ($platform) : bool

If this Doctrine Type maps to an already mapped database type,
reverse schema engineering can't tell them apart. You need to mark
one of those types as commented, which will have Doctrine use an SQL
comment to typehint the actual Doctrine Type.

class Doctrine\DBAL\Types::BigIntType

Type that maps a database BIGINT to a PHP string.

classconstant string Doctrine\DBAL\Types\BigIntType::BIGINT

classconstant string Doctrine\DBAL\Types\BigIntType::BINARY

classconstant string Doctrine\DBAL\Types\BigIntType::BLOB

classconstant string Doctrine\DBAL\Types\BigIntType::BOOLEAN

classconstant string Doctrine\DBAL\Types\BigIntType::DATE

classconstant string Doctrine\DBAL\Types\BigIntType::DATE_IMMUTABLE

classconstant string Doctrine\DBAL\Types\BigIntType::DATEINTERVAL

classconstant string Doctrine\DBAL\Types\BigIntType::DATETIME

classconstant string Doctrine\DBAL\Types\BigIntType::DATETIME_IMMUTABLE

classconstant string Doctrine\DBAL\Types\BigIntType::DATETIMETZ

classconstant string Doctrine\DBAL\Types\BigIntType::DATETIMETZ_IMMUTABLE

classconstant string Doctrine\DBAL\Types\BigIntType::DECIMAL

classconstant string Doctrine\DBAL\Types\BigIntType::FLOAT

classconstant string Doctrine\DBAL\Types\BigIntType::GUID

classconstant string Doctrine\DBAL\Types\BigIntType::INTEGER

classconstant string Doctrine\DBAL\Types\BigIntType::JSON

classconstant string Doctrine\DBAL\Types\BigIntType::JSON_ARRAY

classconstant string Doctrine\DBAL\Types\BigIntType::OBJECT

classconstant string Doctrine\DBAL\Types\BigIntType::SIMPLE_ARRAY

classconstant string Doctrine\DBAL\Types\BigIntType::SMALLINT

classconstant string Doctrine\DBAL\Types\BigIntType::STRING

classconstant string Doctrine\DBAL\Types\BigIntType::TARRAY

classconstant string Doctrine\DBAL\Types\BigIntType::TEXT

classconstant string Doctrine\DBAL\Types\BigIntType::TIME

classconstant string Doctrine\DBAL\Types\BigIntType::TIME_IMMUTABLE

method Doctrine\DBAL\Types\BigIntType::getName () : string

Gets the name of this type.

method Doctrine\DBAL\Types\BigIntType::getSQLDeclaration ($fieldDeclaration, $platform) : string

Gets the SQL declaration snippet for a field of this type.

method Doctrine\DBAL\Types\BigIntType::getBindingType () : int

Gets the (preferred) binding type for values of this type that
can be used when binding parameters to prepared statements.

This method should return one of the Doctrine\DBAL\ParameterType constants.

method Doctrine\DBAL\Types\BigIntType::convertToPHPValue ($value, $platform) : mixed

Converts a value from its database representation to its PHP representation
of this type.

method Doctrine\DBAL\Types\BigIntType::__construct () : void

method Doctrine\DBAL\Types\BigIntType::convertToDatabaseValue ($value, $platform) : mixed

Converts a value from its PHP representation to its database representation
of this type.

method Doctrine\DBAL\Types\BigIntType::getDefaultLength ($platform) : intnull

Gets the default length of this type.

method Doctrine\DBAL\Types\BigIntType::getTypeRegistry () : Doctrine\DBAL\Types\TypeRegistry

method Doctrine\DBAL\Types\BigIntType::getType ($name) : Doctrine\DBAL\Types\Type

Factory method to create type instances.
Type instances are implemented as flyweights.

method Doctrine\DBAL\Types\BigIntType::addType ($name, $className) : void

Adds a custom type to the type map.

method Doctrine\DBAL\Types\BigIntType::hasType ($name) : bool

Checks if exists support for a type.

method Doctrine\DBAL\Types\BigIntType::overrideType ($name, $className) : void

Overrides an already defined type to use a different implementation.

method Doctrine\DBAL\Types\BigIntType::getTypesMap () : string[]

Gets the types array map which holds all registered types and the corresponding
type class

method Doctrine\DBAL\Types\BigIntType::__toString () : string

method Doctrine\DBAL\Types\BigIntType::canRequireSQLConversion () : bool

Does working with this column require SQL conversion functions?

This is a metadata function that is required for example in the ORM.
Usage of convertToDatabaseValueSQL and
convertToPHPValueSQL works for any type and mostly
does nothing. This method can additionally be used for optimization purposes.

method Doctrine\DBAL\Types\BigIntType::convertToDatabaseValueSQL ($sqlExpr, $platform) : string

Modifies the SQL expression (identifier, parameter) to convert to a database value.

method Doctrine\DBAL\Types\BigIntType::convertToPHPValueSQL ($sqlExpr, $platform) : string

Modifies the SQL expression (identifier, parameter) to convert to a PHP value.

method Doctrine\DBAL\Types\BigIntType::getMappedDatabaseTypes ($platform) : string[]

Gets an array of database types that map to this Doctrine type.

method Doctrine\DBAL\Types\BigIntType::requiresSQLCommentHint ($platform) : bool

If this Doctrine Type maps to an already mapped database type,
reverse schema engineering can't tell them apart. You need to mark
one of those types as commented, which will have Doctrine use an SQL
comment to typehint the actual Doctrine Type.

class Doctrine\DBAL\Types::IntegerType

Type that maps an SQL INT to a PHP integer.

classconstant string Doctrine\DBAL\Types\IntegerType::BIGINT

classconstant string Doctrine\DBAL\Types\IntegerType::BINARY

classconstant string Doctrine\DBAL\Types\IntegerType::BLOB

classconstant string Doctrine\DBAL\Types\IntegerType::BOOLEAN

classconstant string Doctrine\DBAL\Types\IntegerType::DATE

classconstant string Doctrine\DBAL\Types\IntegerType::DATE_IMMUTABLE

classconstant string Doctrine\DBAL\Types\IntegerType::DATEINTERVAL

classconstant string Doctrine\DBAL\Types\IntegerType::DATETIME

classconstant string Doctrine\DBAL\Types\IntegerType::DATETIME_IMMUTABLE

classconstant string Doctrine\DBAL\Types\IntegerType::DATETIMETZ

classconstant string Doctrine\DBAL\Types\IntegerType::DATETIMETZ_IMMUTABLE

classconstant string Doctrine\DBAL\Types\IntegerType::DECIMAL

classconstant string Doctrine\DBAL\Types\IntegerType::FLOAT

classconstant string Doctrine\DBAL\Types\IntegerType::GUID

classconstant string Doctrine\DBAL\Types\IntegerType::INTEGER

classconstant string Doctrine\DBAL\Types\IntegerType::JSON

classconstant string Doctrine\DBAL\Types\IntegerType::JSON_ARRAY

classconstant string Doctrine\DBAL\Types\IntegerType::OBJECT

classconstant string Doctrine\DBAL\Types\IntegerType::SIMPLE_ARRAY

classconstant string Doctrine\DBAL\Types\IntegerType::SMALLINT

classconstant string Doctrine\DBAL\Types\IntegerType::STRING

classconstant string Doctrine\DBAL\Types\IntegerType::TARRAY

classconstant string Doctrine\DBAL\Types\IntegerType::TEXT

classconstant string Doctrine\DBAL\Types\IntegerType::TIME

classconstant string Doctrine\DBAL\Types\IntegerType::TIME_IMMUTABLE

method Doctrine\DBAL\Types\IntegerType::getName () : string

Gets the name of this type.

method Doctrine\DBAL\Types\IntegerType::getSQLDeclaration ($fieldDeclaration, $platform) : string

Gets the SQL declaration snippet for a field of this type.

method Doctrine\DBAL\Types\IntegerType::convertToPHPValue ($value, $platform) : mixed

Converts a value from its database representation to its PHP representation
of this type.

method Doctrine\DBAL\Types\IntegerType::getBindingType () : int

Gets the (preferred) binding type for values of this type that
can be used when binding parameters to prepared statements.

This method should return one of the Doctrine\DBAL\ParameterType constants.

method Doctrine\DBAL\Types\IntegerType::__construct () : void

method Doctrine\DBAL\Types\IntegerType::convertToDatabaseValue ($value, $platform) : mixed

Converts a value from its PHP representation to its database representation
of this type.

method Doctrine\DBAL\Types\IntegerType::getDefaultLength ($platform) : intnull

Gets the default length of this type.

method Doctrine\DBAL\Types\IntegerType::getTypeRegistry () : Doctrine\DBAL\Types\TypeRegistry

method Doctrine\DBAL\Types\IntegerType::getType ($name) : Doctrine\DBAL\Types\Type

Factory method to create type instances.
Type instances are implemented as flyweights.

method Doctrine\DBAL\Types\IntegerType::addType ($name, $className) : void

Adds a custom type to the type map.

method Doctrine\DBAL\Types\IntegerType::hasType ($name) : bool

Checks if exists support for a type.

method Doctrine\DBAL\Types\IntegerType::overrideType ($name, $className) : void

Overrides an already defined type to use a different implementation.

method Doctrine\DBAL\Types\IntegerType::getTypesMap () : string[]

Gets the types array map which holds all registered types and the corresponding
type class

method Doctrine\DBAL\Types\IntegerType::__toString () : string

method Doctrine\DBAL\Types\IntegerType::canRequireSQLConversion () : bool

Does working with this column require SQL conversion functions?

This is a metadata function that is required for example in the ORM.
Usage of convertToDatabaseValueSQL and
convertToPHPValueSQL works for any type and mostly
does nothing. This method can additionally be used for optimization purposes.

method Doctrine\DBAL\Types\IntegerType::convertToDatabaseValueSQL ($sqlExpr, $platform) : string

Modifies the SQL expression (identifier, parameter) to convert to a database value.

method Doctrine\DBAL\Types\IntegerType::convertToPHPValueSQL ($sqlExpr, $platform) : string

Modifies the SQL expression (identifier, parameter) to convert to a PHP value.

method Doctrine\DBAL\Types\IntegerType::getMappedDatabaseTypes ($platform) : string[]

Gets an array of database types that map to this Doctrine type.

method Doctrine\DBAL\Types\IntegerType::requiresSQLCommentHint ($platform) : bool

If this Doctrine Type maps to an already mapped database type,
reverse schema engineering can't tell them apart. You need to mark
one of those types as commented, which will have Doctrine use an SQL
comment to typehint the actual Doctrine Type.

class Doctrine\DBAL\Types::StringType

Type that maps an SQL VARCHAR to a PHP string.

classconstant string Doctrine\DBAL\Types\StringType::BIGINT

classconstant string Doctrine\DBAL\Types\StringType::BINARY

classconstant string Doctrine\DBAL\Types\StringType::BLOB

classconstant string Doctrine\DBAL\Types\StringType::BOOLEAN

classconstant string Doctrine\DBAL\Types\StringType::DATE

classconstant string Doctrine\DBAL\Types\StringType::DATE_IMMUTABLE

classconstant string Doctrine\DBAL\Types\StringType::DATEINTERVAL

classconstant string Doctrine\DBAL\Types\StringType::DATETIME

classconstant string Doctrine\DBAL\Types\StringType::DATETIME_IMMUTABLE

classconstant string Doctrine\DBAL\Types\StringType::DATETIMETZ

classconstant string Doctrine\DBAL\Types\StringType::DATETIMETZ_IMMUTABLE

classconstant string Doctrine\DBAL\Types\StringType::DECIMAL

classconstant string Doctrine\DBAL\Types\StringType::FLOAT

classconstant string Doctrine\DBAL\Types\StringType::GUID

classconstant string Doctrine\DBAL\Types\StringType::INTEGER

classconstant string Doctrine\DBAL\Types\StringType::JSON

classconstant string Doctrine\DBAL\Types\StringType::JSON_ARRAY

classconstant string Doctrine\DBAL\Types\StringType::OBJECT

classconstant string Doctrine\DBAL\Types\StringType::SIMPLE_ARRAY

classconstant string Doctrine\DBAL\Types\StringType::SMALLINT

classconstant string Doctrine\DBAL\Types\StringType::STRING

classconstant string Doctrine\DBAL\Types\StringType::TARRAY

classconstant string Doctrine\DBAL\Types\StringType::TEXT

classconstant string Doctrine\DBAL\Types\StringType::TIME

classconstant string Doctrine\DBAL\Types\StringType::TIME_IMMUTABLE

method Doctrine\DBAL\Types\StringType::getSQLDeclaration ($fieldDeclaration, $platform) : string

Gets the SQL declaration snippet for a field of this type.

method Doctrine\DBAL\Types\StringType::getDefaultLength ($platform) : intnull

Gets the default length of this type.

method Doctrine\DBAL\Types\StringType::getName () : string

Gets the name of this type.

method Doctrine\DBAL\Types\StringType::__construct () : void

method Doctrine\DBAL\Types\StringType::convertToDatabaseValue ($value, $platform) : mixed

Converts a value from its PHP representation to its database representation
of this type.

method Doctrine\DBAL\Types\StringType::convertToPHPValue ($value, $platform) : mixed

Converts a value from its database representation to its PHP representation
of this type.

method Doctrine\DBAL\Types\StringType::getTypeRegistry () : Doctrine\DBAL\Types\TypeRegistry

method Doctrine\DBAL\Types\StringType::getType ($name) : Doctrine\DBAL\Types\Type

Factory method to create type instances.
Type instances are implemented as flyweights.

method Doctrine\DBAL\Types\StringType::addType ($name, $className) : void

Adds a custom type to the type map.

method Doctrine\DBAL\Types\StringType::hasType ($name) : bool

Checks if exists support for a type.

method Doctrine\DBAL\Types\StringType::overrideType ($name, $className) : void

Overrides an already defined type to use a different implementation.

method Doctrine\DBAL\Types\StringType::getBindingType () : int

Gets the (preferred) binding type for values of this type that
can be used when binding parameters to prepared statements.

This method should return one of the Doctrine\DBAL\ParameterType constants.

method Doctrine\DBAL\Types\StringType::getTypesMap () : string[]

Gets the types array map which holds all registered types and the corresponding
type class

method Doctrine\DBAL\Types\StringType::__toString () : string

method Doctrine\DBAL\Types\StringType::canRequireSQLConversion () : bool

Does working with this column require SQL conversion functions?

This is a metadata function that is required for example in the ORM.
Usage of convertToDatabaseValueSQL and
convertToPHPValueSQL works for any type and mostly
does nothing. This method can additionally be used for optimization purposes.

method Doctrine\DBAL\Types\StringType::convertToDatabaseValueSQL ($sqlExpr, $platform) : string

Modifies the SQL expression (identifier, parameter) to convert to a database value.

method Doctrine\DBAL\Types\StringType::convertToPHPValueSQL ($sqlExpr, $platform) : string

Modifies the SQL expression (identifier, parameter) to convert to a PHP value.

method Doctrine\DBAL\Types\StringType::getMappedDatabaseTypes ($platform) : string[]

Gets an array of database types that map to this Doctrine type.

method Doctrine\DBAL\Types\StringType::requiresSQLCommentHint ($platform) : bool

If this Doctrine Type maps to an already mapped database type,
reverse schema engineering can't tell them apart. You need to mark
one of those types as commented, which will have Doctrine use an SQL
comment to typehint the actual Doctrine Type.

class Doctrine\DBAL\Types::TypeRegistry

The type registry is responsible for holding a map of all known DBAL types.
The types are stored using the flyweight pattern so that one type only exists as exactly one instance.

method Doctrine\DBAL\Types\TypeRegistry::get ($name) : Doctrine\DBAL\Types\Type

Finds a type by the given name.

method Doctrine\DBAL\Types\TypeRegistry::lookupName ($type) : string

Finds a name for the given type.

method Doctrine\DBAL\Types\TypeRegistry::has ($name) : bool

Checks if there is a type of the given name.

method Doctrine\DBAL\Types\TypeRegistry::register ($name, $type) : void

Registers a custom type to the type map.

method Doctrine\DBAL\Types\TypeRegistry::override ($name, $type) : void

Overrides an already defined type to use a different implementation.

method Doctrine\DBAL\Types\TypeRegistry::getMap () : arrayarray<string,

Gets the map of all registered types and their corresponding type instances.

interface Doctrine\DBAL\Types::PhpIntegerMappingType

Implementations should map a database type to a PHP integer.

class Doctrine\DBAL::Connection

A wrapper around a Doctrine\DBAL\Driver\Connection that adds features like
events, transaction isolation levels, configuration, emulated transaction nesting,
lazy connecting and more.

classconstant integer Doctrine\DBAL\Connection::TRANSACTION_READ_UNCOMMITTED

Constant for transaction isolation level READ UNCOMMITTED.

classconstant integer Doctrine\DBAL\Connection::TRANSACTION_READ_COMMITTED

Constant for transaction isolation level READ COMMITTED.

classconstant integer Doctrine\DBAL\Connection::TRANSACTION_REPEATABLE_READ

Constant for transaction isolation level REPEATABLE READ.

classconstant integer Doctrine\DBAL\Connection::TRANSACTION_SERIALIZABLE

Constant for transaction isolation level SERIALIZABLE.

classconstant integer Doctrine\DBAL\Connection::PARAM_INT_ARRAY

Represents an array of ints to be expanded by Doctrine SQL parsing.

classconstant integer Doctrine\DBAL\Connection::PARAM_STR_ARRAY

Represents an array of strings to be expanded by Doctrine SQL parsing.

classconstant integer Doctrine\DBAL\Connection::ARRAY_PARAM_OFFSET

Offset by which PARAM_* constants are detected as arrays of the param type.

property Doctrine\DBAL\Driver\Connectionnull Doctrine\DBAL\Connection::_conn

The wrapped driver connection.

property Doctrine\DBAL\Configuration Doctrine\DBAL\Connection::_config

property Doctrine\Common\EventManager Doctrine\DBAL\Connection::_eventManager

property Doctrine\DBAL\Query\Expression\ExpressionBuilder Doctrine\DBAL\Connection::_expr

property Doctrine\DBAL\Schema\AbstractSchemaManagernull Doctrine\DBAL\Connection::_schemaManager

The schema manager.

property Doctrine\DBAL\Driver Doctrine\DBAL\Connection::_driver

The used DBAL driver.

property int Doctrine\DBAL\Connection::defaultFetchMode

method Doctrine\DBAL\Connection::__construct ($params, $driver, $config = null, $eventManager = null) : void

Initializes a new instance of the Connection class.

method Doctrine\DBAL\Connection::getParams () : mixed[]

Gets the parameters used during instantiation.

method Doctrine\DBAL\Connection::getDatabase () : string

Gets the name of the database this Connection is connected to.

method Doctrine\DBAL\Connection::getHost () : stringnull

Gets the hostname of the currently connected database.

method Doctrine\DBAL\Connection::getPort () : mixed

Gets the port of the currently connected database.

method Doctrine\DBAL\Connection::getUsername () : stringnull

Gets the username used by this connection.

method Doctrine\DBAL\Connection::getPassword () : stringnull

Gets the password used by this connection.

method Doctrine\DBAL\Connection::getDriver () : Doctrine\DBAL\Driver

Gets the DBAL driver instance.

method Doctrine\DBAL\Connection::getConfiguration () : Doctrine\DBAL\Configuration

Gets the Configuration used by the Connection.

method Doctrine\DBAL\Connection::getEventManager () : Doctrine\Common\EventManager

Gets the EventManager used by the Connection.

method Doctrine\DBAL\Connection::getDatabasePlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

Gets the DatabasePlatform for the connection.

method Doctrine\DBAL\Connection::getExpressionBuilder () : Doctrine\DBAL\Query\Expression\ExpressionBuilder

Gets the ExpressionBuilder for the connection.

method Doctrine\DBAL\Connection::connect () : bool

Establishes the connection with the database.

method Doctrine\DBAL\Connection::isAutoCommit () : bool

Returns the current auto-commit mode for this connection.

method Doctrine\DBAL\Connection::setAutoCommit ($autoCommit) : void

Sets auto-commit mode for this connection.

If a connection is in auto-commit mode, then all its SQL statements will be executed and committed as individual
transactions. Otherwise, its SQL statements are grouped into transactions that are terminated by a call to either
the method commit or the method rollback. By default, new connections are in auto-commit mode.

NOTE: If this method is called during a transaction and the auto-commit mode is changed, the transaction is
committed. If this method is called and the auto-commit mode is not changed, the call is a no-op.

method Doctrine\DBAL\Connection::setFetchMode ($fetchMode) : void

Sets the fetch mode.

method Doctrine\DBAL\Connection::fetchAssoc ($statement, $params = [], $types = []) : mixed[]false

Prepares and executes an SQL query and returns the first row of the result
as an associative array.

method Doctrine\DBAL\Connection::fetchArray ($statement, $params = [], $types = []) : mixed[]false

Prepares and executes an SQL query and returns the first row of the result
as a numerically indexed array.

method Doctrine\DBAL\Connection::fetchColumn ($statement, $params = [], $column = 0, $types = []) : mixedfalse

Prepares and executes an SQL query and returns the value of a single column
of the first row of the result.

method Doctrine\DBAL\Connection::isConnected () : bool

Whether an actual connection to the database is established.

method Doctrine\DBAL\Connection::isTransactionActive () : bool

Checks whether a transaction is currently active.

method Doctrine\DBAL\Connection::delete ($tableExpression, $identifier, $types = []) : int

Executes an SQL DELETE statement on a table.

Table expression and columns are not escaped and are not safe for user-input.

method Doctrine\DBAL\Connection::close () : void

Closes the connection.

method Doctrine\DBAL\Connection::setTransactionIsolation ($level) : int

Sets the transaction isolation level.

method Doctrine\DBAL\Connection::getTransactionIsolation () : int

Gets the currently active transaction isolation level.

method Doctrine\DBAL\Connection::update ($tableExpression, $data, $identifier, $types = []) : int

Executes an SQL UPDATE statement on a table.

Table expression and columns are not escaped and are not safe for user-input.

method Doctrine\DBAL\Connection::insert ($tableExpression, $data, $types = []) : int

Inserts a table row with specified data.

Table expression and columns are not escaped and are not safe for user-input.

method Doctrine\DBAL\Connection::quoteIdentifier ($str) : string

Quotes a string so it can be safely used as a table or column name, even if
it is a reserved name.

Delimiting style depends on the underlying database platform that is being used.

NOTE: Just because you CAN use quoted identifiers does not mean
you SHOULD use them. In general, they end up causing way more
problems than they solve.

method Doctrine\DBAL\Connection::quote ($input, $type = Doctrine\DBAL\ParameterType::STRING) : mixed

Quotes a string for use in a query.

method Doctrine\DBAL\Connection::fetchAll ($sql, $params = [], $types = []) : mixed[]

Prepares and executes an SQL query and returns the result as an associative array.

method Doctrine\DBAL\Connection::prepare ($statement) : Doctrine\DBAL\Driver\Statement

Prepares an SQL statement.

method Doctrine\DBAL\Connection::executeQuery ($query, $params = [], $types = [], $qcp = null) : Doctrine\DBAL\Driver\ResultStatement

Executes an, optionally parametrized, SQL query.

If the query is parametrized, a prepared statement is used.
If an SQLLogger is configured, the execution is logged.

method Doctrine\DBAL\Connection::executeCacheQuery ($query, $params, $types, $qcp) : Doctrine\DBAL\Driver\ResultStatement

Executes a caching query.

method Doctrine\DBAL\Connection::project ($query, $params, $function) : mixed[]

Executes an, optionally parametrized, SQL query and returns the result,
applying a given projection/transformation function on each row of the result.

method Doctrine\DBAL\Connection::query () : Doctrine\DBAL\Driver\Statement

Executes an SQL statement, returning a result set as a Statement object.

method Doctrine\DBAL\Connection::executeUpdate ($query, $params = [], $types = []) : int

Executes an SQL INSERT/UPDATE/DELETE query with the given parameters
and returns the number of affected rows.

This method supports PDO binding types as well as DBAL mapping types.

method Doctrine\DBAL\Connection::exec ($statement) : int

Executes an SQL statement and return the number of affected rows.

method Doctrine\DBAL\Connection::getTransactionNestingLevel () : int

Returns the current transaction nesting level.

method Doctrine\DBAL\Connection::errorCode () : stringnull

Fetches the SQLSTATE associated with the last database operation.

method Doctrine\DBAL\Connection::errorInfo () : mixed[]

Returns extended error information associated with the last operation on the database handle.

method Doctrine\DBAL\Connection::lastInsertId ($seqName = null) : string

Returns the ID of the last inserted row, or the last value from a sequence object,
depending on the underlying driver.

Note: This method may not return a meaningful or consistent result across different drivers,
because the underlying database may not even support the notion of AUTO_INCREMENT/IDENTITY
columns or sequences.

method Doctrine\DBAL\Connection::transactional ($func) : mixed

Executes a function in a transaction.

The function gets passed this Connection instance as an (optional) parameter.

If an exception occurs during execution of the function or transaction commit,
the transaction is rolled back and the exception re-thrown.

method Doctrine\DBAL\Connection::setNestTransactionsWithSavepoints ($nestTransactionsWithSavepoints) : void

Sets if nested transactions should use savepoints.

method Doctrine\DBAL\Connection::getNestTransactionsWithSavepoints () : bool

Gets if nested transactions should use savepoints.

method Doctrine\DBAL\Connection::_getNestedTransactionSavePointName () : mixed

Returns the savepoint name to use for nested transactions are false if they are not supported
"savepointFormat" parameter is not set

method Doctrine\DBAL\Connection::beginTransaction () : bool

Initiates a transaction.

method Doctrine\DBAL\Connection::commit () : bool

Commits a transaction.

method Doctrine\DBAL\Connection::rollBack () : void

Cancels any database changes done during the current transaction.

method Doctrine\DBAL\Connection::createSavepoint ($savepoint) : void

Creates a new savepoint.

method Doctrine\DBAL\Connection::releaseSavepoint ($savepoint) : void

Releases the given savepoint.

method Doctrine\DBAL\Connection::rollbackSavepoint ($savepoint) : void

Rolls back to the given savepoint.

method Doctrine\DBAL\Connection::getWrappedConnection () : Doctrine\DBAL\Driver\Connection

Gets the wrapped driver connection.

method Doctrine\DBAL\Connection::getSchemaManager () : Doctrine\DBAL\Schema\AbstractSchemaManager

Gets the SchemaManager that can be used to inspect or change the
database schema through the connection.

method Doctrine\DBAL\Connection::setRollbackOnly () : void

Marks the current transaction so that the only possible
outcome for the transaction to be rolled back.

method Doctrine\DBAL\Connection::isRollbackOnly () : bool

Checks whether the current transaction is marked for rollback only.

method Doctrine\DBAL\Connection::convertToDatabaseValue ($value, $type) : mixed

Converts a given value to its database representation according to the conversion
rules of a specific DBAL mapping type.

method Doctrine\DBAL\Connection::convertToPHPValue ($value, $type) : mixed

Converts a given value to its PHP representation according to the conversion
rules of a specific DBAL mapping type.

method Doctrine\DBAL\Connection::resolveParams ($params, $types) : mixed[]

Resolves the parameters to a format which can be displayed.

method Doctrine\DBAL\Connection::createQueryBuilder () : Doctrine\DBAL\Query\QueryBuilder

Creates a new instance of a SQL query builder.

method Doctrine\DBAL\Connection::ping () : bool

Ping the server

When the server is not available the method returns FALSE.
It is responsibility of the developer to handle this case
and abort the request or reconnect manually:

class Doctrine\DBAL::FetchMode

Contains statement fetch modes.

classconstant integer Doctrine\DBAL\FetchMode::ASSOCIATIVE

Specifies that the fetch method shall return each row as an array indexed
by column name as returned in the corresponding result set. If the result
set contains multiple columns with the same name, the statement returns
only a single value per column name.

classconstant integer Doctrine\DBAL\FetchMode::NUMERIC

Specifies that the fetch method shall return each row as an array indexed
by column number as returned in the corresponding result set, starting at
column 0.

classconstant integer Doctrine\DBAL\FetchMode::MIXED

Specifies that the fetch method shall return each row as an array indexed
by both column name and number as returned in the corresponding result set,
starting at column 0.

classconstant integer Doctrine\DBAL\FetchMode::STANDARD_OBJECT

Specifies that the fetch method shall return each row as an object with
property names that correspond to the column names returned in the result
set.

classconstant integer Doctrine\DBAL\FetchMode::COLUMN

Specifies that the fetch method shall return only a single requested
column from the next row in the result set.

classconstant integer Doctrine\DBAL\FetchMode::CUSTOM_OBJECT

Specifies that the fetch method shall return a new instance of the
requested class, mapping the columns to named properties in the class.

class Doctrine\DBAL::DBALException

property string Doctrine\DBAL\DBALException::message

property integer Doctrine\DBAL\DBALException::code

property NULL Doctrine\DBAL\DBALException::file

property NULL Doctrine\DBAL\DBALException::line

method Doctrine\DBAL\DBALException::notSupported ($method) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\DBALException::invalidPlatformSpecified () : Doctrine\DBAL\DBALException

method Doctrine\DBAL\DBALException::invalidPlatformType ($invalidPlatform) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\DBALException::invalidPlatformVersionSpecified ($version, $expectedFormat) : Doctrine\DBAL\DBALException

Returns a new instance for an invalid specified platform version.

method Doctrine\DBAL\DBALException::invalidPdoInstance () : Doctrine\DBAL\DBALException

method Doctrine\DBAL\DBALException::driverRequired ($url = null) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\DBALException::unknownDriver ($unknownDriverName, $knownDrivers) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\DBALException::driverExceptionDuringQuery ($driver, $driverEx, $sql, $params = []) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\DBALException::driverException ($driver, $driverEx) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\DBALException::invalidWrapperClass ($wrapperClass) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\DBALException::invalidDriverClass ($driverClass) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\DBALException::invalidTableName ($tableName) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\DBALException::noColumnsSpecifiedForTable ($tableName) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\DBALException::limitOffsetInvalid () : Doctrine\DBAL\DBALException

method Doctrine\DBAL\DBALException::typeExists ($name) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\DBALException::unknownColumnType ($name) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\DBALException::typeNotFound ($name) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\DBALException::typeNotRegistered ($type) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\DBALException::typeAlreadyRegistered ($type) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\DBALException::__construct ($message, $code, $previous) : void

method Doctrine\DBAL\DBALException::__wakeup () : void

method Doctrine\DBAL\DBALException::getMessage () : void

method Doctrine\DBAL\DBALException::getCode () : void

method Doctrine\DBAL\DBALException::getFile () : void

method Doctrine\DBAL\DBALException::getLine () : void

method Doctrine\DBAL\DBALException::getTrace () : void

method Doctrine\DBAL\DBALException::getPrevious () : void

method Doctrine\DBAL\DBALException::getTraceAsString () : void

method Doctrine\DBAL\DBALException::__toString () : void

class Doctrine\DBAL::ParameterType

Contains statement parameter types.

classconstant integer Doctrine\DBAL\ParameterType::NULL

Represents the SQL NULL data type.

classconstant integer Doctrine\DBAL\ParameterType::INTEGER

Represents the SQL INTEGER data type.

classconstant integer Doctrine\DBAL\ParameterType::STRING

Represents the SQL CHAR, VARCHAR, or other string data type.

classconstant integer Doctrine\DBAL\ParameterType::LARGE_OBJECT

Represents the SQL large object data type.

classconstant integer Doctrine\DBAL\ParameterType::BOOLEAN

Represents a boolean data type.

classconstant integer Doctrine\DBAL\ParameterType::BINARY

Represents a binary string data type.

class Doctrine\DBAL::Events

Container for all DBAL events.

This class cannot be instantiated.

classconstant string Doctrine\DBAL\Events::postConnect

classconstant string Doctrine\DBAL\Events::onSchemaCreateTable

classconstant string Doctrine\DBAL\Events::onSchemaCreateTableColumn

classconstant string Doctrine\DBAL\Events::onSchemaDropTable

classconstant string Doctrine\DBAL\Events::onSchemaAlterTable

classconstant string Doctrine\DBAL\Events::onSchemaAlterTableAddColumn

classconstant string Doctrine\DBAL\Events::onSchemaAlterTableRemoveColumn

classconstant string Doctrine\DBAL\Events::onSchemaAlterTableChangeColumn

classconstant string Doctrine\DBAL\Events::onSchemaAlterTableRenameColumn

classconstant string Doctrine\DBAL\Events::onSchemaColumnDefinition

classconstant string Doctrine\DBAL\Events::onSchemaIndexDefinition

class Doctrine\DBAL::TransactionIsolationLevel

classconstant integer Doctrine\DBAL\TransactionIsolationLevel::READ_UNCOMMITTED

Transaction isolation level READ UNCOMMITTED.

classconstant integer Doctrine\DBAL\TransactionIsolationLevel::READ_COMMITTED

Transaction isolation level READ COMMITTED.

classconstant integer Doctrine\DBAL\TransactionIsolationLevel::REPEATABLE_READ

Transaction isolation level REPEATABLE READ.

classconstant integer Doctrine\DBAL\TransactionIsolationLevel::SERIALIZABLE

Transaction isolation level SERIALIZABLE.

class Doctrine\DBAL::ConnectionException

property string Doctrine\DBAL\ConnectionException::message

property integer Doctrine\DBAL\ConnectionException::code

property NULL Doctrine\DBAL\ConnectionException::file

property NULL Doctrine\DBAL\ConnectionException::line

method Doctrine\DBAL\ConnectionException::commitFailedRollbackOnly () : Doctrine\DBAL\ConnectionException

method Doctrine\DBAL\ConnectionException::noActiveTransaction () : Doctrine\DBAL\ConnectionException

method Doctrine\DBAL\ConnectionException::savepointsNotSupported () : Doctrine\DBAL\ConnectionException

method Doctrine\DBAL\ConnectionException::mayNotAlterNestedTransactionWithSavepointsInTransaction () : Doctrine\DBAL\ConnectionException

method Doctrine\DBAL\ConnectionException::notSupported ($method) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\ConnectionException::invalidPlatformSpecified () : Doctrine\DBAL\DBALException

method Doctrine\DBAL\ConnectionException::invalidPlatformType ($invalidPlatform) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\ConnectionException::invalidPlatformVersionSpecified ($version, $expectedFormat) : Doctrine\DBAL\DBALException

Returns a new instance for an invalid specified platform version.

method Doctrine\DBAL\ConnectionException::invalidPdoInstance () : Doctrine\DBAL\DBALException

method Doctrine\DBAL\ConnectionException::driverRequired ($url = null) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\ConnectionException::unknownDriver ($unknownDriverName, $knownDrivers) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\ConnectionException::driverExceptionDuringQuery ($driver, $driverEx, $sql, $params = []) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\ConnectionException::driverException ($driver, $driverEx) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\ConnectionException::invalidWrapperClass ($wrapperClass) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\ConnectionException::invalidDriverClass ($driverClass) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\ConnectionException::invalidTableName ($tableName) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\ConnectionException::noColumnsSpecifiedForTable ($tableName) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\ConnectionException::limitOffsetInvalid () : Doctrine\DBAL\DBALException

method Doctrine\DBAL\ConnectionException::typeExists ($name) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\ConnectionException::unknownColumnType ($name) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\ConnectionException::typeNotFound ($name) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\ConnectionException::typeNotRegistered ($type) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\ConnectionException::typeAlreadyRegistered ($type) : Doctrine\DBAL\DBALException

method Doctrine\DBAL\ConnectionException::__construct ($message, $code, $previous) : void

method Doctrine\DBAL\ConnectionException::__wakeup () : void

method Doctrine\DBAL\ConnectionException::getMessage () : void

method Doctrine\DBAL\ConnectionException::getCode () : void

method Doctrine\DBAL\ConnectionException::getFile () : void

method Doctrine\DBAL\ConnectionException::getLine () : void

method Doctrine\DBAL\ConnectionException::getTrace () : void

method Doctrine\DBAL\ConnectionException::getPrevious () : void

method Doctrine\DBAL\ConnectionException::getTraceAsString () : void

method Doctrine\DBAL\ConnectionException::__toString () : void

class Doctrine\DBAL::DriverManager

Factory for creating Doctrine\DBAL\Connection instances.

method Doctrine\DBAL\DriverManager::getConnection ($params, $config = null, $eventManager = null) : Doctrine\DBAL\Connection

Creates a connection object based on the specified parameters.
This method returns a Doctrine\DBAL\Connection which wraps the underlying
driver connection.

$params must contain at least one of the following.

Either 'driver' with one of the following values:

pdo_mysql
pdo_sqlite
pdo_pgsql
pdo_oci (unstable)
pdo_sqlsrv
pdo_sqlsrv
mysqli
sqlanywhere
sqlsrv
ibm_db2 (unstable)
drizzle_pdo_mysql

OR 'driverClass' that contains the full class name (with namespace) of the
driver class to instantiate.

Other (optional) parameters:

user (string):
The username to use when connecting.

password (string):
The password to use when connecting.

driverOptions (array):
Any additional driver-specific options for the driver. These are just passed
through to the driver.

pdo:
You can pass an existing PDO instance through this parameter. The PDO
instance will be wrapped in a Doctrine\DBAL\Connection.

wrapperClass:
You may specify a custom wrapper class through the 'wrapperClass'
parameter but this class MUST inherit from Doctrine\DBAL\Connection.

driverClass:
The driver class to use.

method Doctrine\DBAL\DriverManager::getAvailableDrivers () : arraystring[]

Returns the list of supported drivers.

class Doctrine\DBAL::LockMode

Contains all DBAL LockModes.

classconstant integer Doctrine\DBAL\LockMode::NONE

classconstant integer Doctrine\DBAL\LockMode::OPTIMISTIC

classconstant integer Doctrine\DBAL\LockMode::PESSIMISTIC_READ

classconstant integer Doctrine\DBAL\LockMode::PESSIMISTIC_WRITE

class Doctrine\DBAL::Configuration

Configuration container for the Doctrine DBAL.

property mixed[] Doctrine\DBAL\Configuration::_attributes

The attributes that are contained in the configuration.
Values are default values.

method Doctrine\DBAL\Configuration::setSQLLogger ($logger = null) : void

Sets the SQL logger to use. Defaults to NULL which means SQL logging is disabled.

method Doctrine\DBAL\Configuration::getSQLLogger () : Doctrine\DBAL\Logging\SQLLoggernull

Gets the SQL logger that is used.

method Doctrine\DBAL\Configuration::getResultCacheImpl () : Doctrine\Common\Cache\Cachenull

Gets the cache driver implementation that is used for query result caching.

method Doctrine\DBAL\Configuration::setResultCacheImpl ($cacheImpl) : void

Sets the cache driver implementation that is used for query result caching.

method Doctrine\DBAL\Configuration::setFilterSchemaAssetsExpression ($filterExpression) : void

Sets the filter schema assets expression.

Only include tables/sequences matching the filter expression regexp in
schema instances generated for the active connection when calling
{AbstractSchemaManager#createSchema()}.

method Doctrine\DBAL\Configuration::getFilterSchemaAssetsExpression () : stringnull

Returns filter schema assets expression.

method Doctrine\DBAL\Configuration::setSchemaAssetsFilter ($callable = null) : callable

Sets the callable to use to filter schema assets.

method Doctrine\DBAL\Configuration::getSchemaAssetsFilter () : callable

Returns the callable to use to filter schema assets.

method Doctrine\DBAL\Configuration::setAutoCommit ($autoCommit) : void

Sets the default auto-commit mode for connections.

If a connection is in auto-commit mode, then all its SQL statements will be executed and committed as individual
transactions. Otherwise, its SQL statements are grouped into transactions that are terminated by a call to either
the method commit or the method rollback. By default, new connections are in auto-commit mode.

method Doctrine\DBAL\Configuration::getAutoCommit () : bool

Returns the default auto-commit mode for connections.

class Doctrine\DBAL::Statement

A thin wrapper around a Doctrine\DBAL\Driver\Statement that adds support
for logging, DBAL mapping types, etc.

property string Doctrine\DBAL\Statement::sql

The SQL statement.

property mixed[] Doctrine\DBAL\Statement::params

The bound parameters.

property int[]string[] Doctrine\DBAL\Statement::types

The parameter types.

property Doctrine\DBAL\Driver\Statement Doctrine\DBAL\Statement::stmt

The underlying driver statement.

property Doctrine\DBAL\Platforms\AbstractPlatform Doctrine\DBAL\Statement::platform

The underlying database platform.

property Doctrine\DBAL\Connection Doctrine\DBAL\Statement::conn

The connection this statement is bound to and executed on.

method Doctrine\DBAL\Statement::__construct ($sql, $conn) : void

Creates a new Statement for the given SQL and Connection.

method Doctrine\DBAL\Statement::bindValue ($name, $value, $type = Doctrine\DBAL\ParameterType::STRING) : bool

Binds a parameter value to the statement.

The value can optionally be bound with a PDO binding type or a DBAL mapping type.
If bound with a DBAL mapping type, the binding type is derived from the mapping
type and the value undergoes the conversion routines of the mapping type before
being bound.

method Doctrine\DBAL\Statement::bindParam ($name, &$var, $type = Doctrine\DBAL\ParameterType::STRING, $length = null) : bool

Binds a parameter to a value by reference.

Binding a parameter by reference does not support DBAL mapping types.

method Doctrine\DBAL\Statement::execute ($params = null) : bool

Executes the statement with the currently bound parameters.

method Doctrine\DBAL\Statement::closeCursor () : bool

Closes the cursor, freeing the database resources used by this statement.

method Doctrine\DBAL\Statement::columnCount () : int

Returns the number of columns in the result set.

method Doctrine\DBAL\Statement::errorCode () : stringintbool

Fetches the SQLSTATE associated with the last operation on the statement.

method Doctrine\DBAL\Statement::errorInfo () : mixed[]

Fetches extended error information associated with the last operation on the statement handle.

method Doctrine\DBAL\Statement::setFetchMode ($fetchMode, $arg2 = null, $arg3 = null) : bool

Sets the fetch mode to use while iterating this statement.

method Doctrine\DBAL\Statement::getIterator () : void

Required by interface IteratorAggregate.

method Doctrine\DBAL\Statement::fetch ($fetchMode = null, $cursorOrientation = PDO::FETCH_ORI_NEXT, $cursorOffset = 0) : mixed

Returns the next row of a result set.

method Doctrine\DBAL\Statement::fetchAll ($fetchMode = null, $fetchArgument = null, $ctorArgs = null) : mixed[]

Returns an array containing all of the result set rows.

method Doctrine\DBAL\Statement::fetchColumn ($columnIndex = 0) : mixedfalse

Returns a single column from the next row of a result set or FALSE if there are no more rows.

method Doctrine\DBAL\Statement::rowCount () : int

Returns the number of rows affected by the last execution of this statement.

method Doctrine\DBAL\Statement::getWrappedStatement () : Doctrine\DBAL\Driver\Statement

Gets the wrapped driver statement.

interface Doctrine\DBAL::Driver

Driver interface.
Interface that all DBAL drivers must implement.

method Doctrine\DBAL\Driver::connect ($params, $username = null, $password = null, $driverOptions = []) : Doctrine\DBAL\Driver\Connection

Attempts to create a connection with the database.

The usage of NULL to indicate empty username or password is deprecated. Use an empty string instead.

method Doctrine\DBAL\Driver::getDatabasePlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

Gets the DatabasePlatform instance that provides all the metadata about
the platform this driver connects to.

method Doctrine\DBAL\Driver::getSchemaManager ($conn) : Doctrine\DBAL\Schema\AbstractSchemaManager

Gets the SchemaManager that can be used to inspect and change the underlying
database schema of the platform this driver connects to.

method Doctrine\DBAL\Driver::getName () : string

Gets the name of the driver.

method Doctrine\DBAL\Driver::getDatabase ($conn) : string

Gets the name of the database connected to for this driver.

interface Doctrine\DBAL::VersionAwarePlatformDriver

Contract for a driver that is able to create platform instances by version.

Doctrine uses different platform classes for different vendor versions to
support the correct features and SQL syntax of each version.
This interface should be implemented by drivers that are capable to do this
distinction.

method Doctrine\DBAL\VersionAwarePlatformDriver::createDatabasePlatformForVersion ($version) : Doctrine\DBAL\Platforms\AbstractPlatform

Factory method for creating the appropriate platform instance for the given version.

namespace ryunosuke

namespace ryunosuke\dbml

特定のクラスに依存しない全体仕様を以下に記す。

データベーススキーマ

まず大前提として別スキーマへのクエリは一切サポートしない
ただし、 ryunosuke\dbml\Gateway\TableGatewayryunosuke\dbml\Query\QueryBuilder の話であり、 ryunosuke\dbml\Database::fetchArray() などで直接クエリを投げる場合はこの限りではない。

テーブルやカラムのコメントにはメタ情報として ini 形式の文字列を埋め込むことができる。
これに関しては ryunosuke\dbml\Metadata\Schema も参照。

上記のようなメタ情報やスキーマ情報はキャッシュに保存される。
このキャッシュは ryunosuke\dbml\Database::__construct() のオプションで指定する。
結構な勢いでスキーマを漁るので、何らかの永続キャッシュ(FilesystemCache や ApcuCache など)を使用したほうが良い。

テーブル記法

各クラスの各メソッドで引数名が $tableDescriptor となっているものは下記の記法を受け入れる(ryunosuke\dbml\Query\Expression\TableDescriptor から抜粋)。

要素必須説明
joinsign任意JOIN する場合に結合方法を表す記号を置く('*':CROSS, '+':INNER, '<':LEFT, '>':RIGHT, '~':AUTO, ',':FROM)
tablename必須取得するテーブル名を指定する
(pkval)任意主キーの値を指定する
@scope任意対応する Gateway がありかつ scope というスコープが定義されているならそのスコープを当てる(複数可)
:fkeyname任意JOIN に使用する外部キー名を指定する
[condition]任意JOIN に使用する結合条件を yaml で指定する(where 記法)
{condition}任意JOIN に使用する結合条件を yaml で指定する(カラム結合)
#offset-limit任意LIMIT, OFFSET を指定する
+order-by任意ORDER BY を指定する
AS Alias任意テーブルエイリアスを指定する
.col1, col2 AS C2任意取得するカラムを指定する

上記を base としてさらに JOIN や子供行取得を含めると下記のようになる。

この記法をテーブル記法と呼称する。
端的に言えば SQL の「SELECT 句」「FROM 句」「JOIN 句」「WHERE 句」「ORDER 句」「LIMIT 句」をすべてひっくるめて文字列で指定できるイメージである。

いくつかの例を以下に記す。

base

# tablename 以外の省略可能なものを省略した最もシンプルな例
$db->select('t_article');
// SELECT * FROM t_article

# @scope でスコープを適用する例(t_article に active というスコープ(where: delete_flg=0)があることが前提)
$db->select('t_article@active');
// SELECT * FROM t_article WHERE t_article.delete_flg = 0

# @scope を続けることで複数のスコープを当てられる(t_article に latest というスコープ(order: create_time DESC)があることが前提)
$db->select('t_article@active@latest');
// SELECT * FROM t_article WHERE t_article.delete_flg = 0 ORDER BY t_article.create_time DESC

# yaml 記法のハッシュの配列で複数条件を指定する(Database::whereInto と同じ)
$db->select('t_article@active@latest[flag1: 1, "flag2 < ?": 2]');
// SELECT * FROM t_article WHERE (t_article.delete_flg = 0) AND ((t_article.flag = 1) AND (t_article.flag2 < 2)) ORDER BY t_article.create_time DESC

# (pkval) で主キーを指定する例
$db->select('t_article(1)');
// SELECT * FROM t_article WHERE article_id = 1

# #offset-limit で取得件数を指定する例
$db->select('t_article#40-60');
// SELECT * FROM t_article LIMIT 20 OFFSET 40

# AS alias でテーブルのエイリアスを指定する
$db->select('t_article@active@latest[flag1: 1, "flag2 < ?": 2] AS A');
// SELECT * FROM t_article AS A WHERE (A.delete_flg = 0) AND ((A.flag = 1) AND (A.flag2 < 2)) ORDER BY A.create_time DESC

# .(ドット)以降で取得カラムを指定する
$db->select('t_article@active@latest[flag1: 1, "flag2 < ?": 2] AS A.article_id');
// SELECT A.article_id FROM t_article AS A WHERE (A.delete_flg = 0) AND ((A.flag = 1) AND (A.flag2 < 2)) ORDER BY A.create_time DESC

# 取得カラムは,(カンマ)区切りで複数指定でき、エイリアスも指定できる
$db->select('t_article@active@latest[flag1: 1, "flag2 < ?": 2] AS A.article_id, title AS T');
// SELECT A.article_id, A.title AS T FROM t_article AS A WHERE (A.delete_flg = 0) AND ((A.flag = 1) AND (A.flag2 < 2)) ORDER BY A.create_time DESC

join

# :fkeyname で JOIN 時の外部キーを指定する(t_article と t_comment に fkeyAC: article_id があることが前提)
$db->select('t_article<t_comment:fkeyAC');
$db->select('t_article<t_comment'); // 同じ。テーブル間外部キーが一つなら指定は省略できる
// SELECT t_article.*, t_comment.* FROM t_article LEFT JOIN t_comment ON (t_comment.article_id = t_article.article_id)

# [condition] で JOIN 時の結合条件を指定する(yaml の配列記法は where 的な動作になる)
$db->select('t_article<t_comment[delete_flg=0]');
// SELECT t_article.*, t_comment.* FROM t_article LEFT JOIN t_comment ON (t_comment.article_id = t_article.article_id) AND (delete_flg=0)

# 各テーブル要素には base の記法がほぼすべて使える
$db->select('t_article@active[article_id=9] AS A.article_id+t_comment:fkeyAC AS C.comment');
// SELECT A.article_id, C.comment FROM t_article AS A INNER JOIN t_comment AS C ON (C.article_id = T.article_id) WHERE article_id=9

subselect

# 親子の階層で取得する
$db->selectArray('t_article/t_comment');
// SELECT t_article.*, t_article.article_id FROM t_article
// SELECT t_comment.comment_id AS comment_id, t_comment.* FROM t_comment WHERE t_comment.article_id IN ('1', '2', ...)

# 各テーブル要素には base の記法がほぼすべて使える
$db->selectArray('t_article@latest[delete_flg=0] AS A.article_id/t_comment AS C.comment');
// SELECT A.article_id FROM t_article AS A WHERE delete_flg=0
// SELECT C.comment_id AS __dbml_auto_pk, C.comment, C.article_id AS __dbml_auto_ck FROM t_comment AS C WHERE C.article_id IN ('1', '2', ...)

カラムの修飾はテーブルにエイリアスが貼られている場合はエイリアスで、無いならテーブル名で、と可能な限り正しく修飾される。
ただし、明示的に修飾されている場合は一切修飾を行わない。
素のカラム名が現れたときは直近のテーブル名(エイリアス)で修飾される。

ただし、構文解析などはしておらず、文字列ではパースに限界があるので、テーブル・カラムレベルでは配列でバラして指定することもできる。
実用上はこっちの指定の方がはるかに多い。

# base の最も複雑なものをバラして配列で指定する
$db->select([
    't_article@active@latest[flag1: 1, "flag2 < ?": 2] AS A' => [
        'article_id',
        'T' => 'title',
    ],
]);
// 右記と同じ: $db->select('t_article@active@latest[flag1: 1, "flag2 < ?": 2] AS A.article_id, title AS T');

# join の最も複雑なものをバラして配列で指定する
$db->select([
    't_article@active[article_id=9] AS A' => [
        'article_id',
        // JOIN 記号のあるキーはカラム取得ではなく JOIN と解釈される
        '+t_comment:fkeyAC AS C' => [
            // このようにキーなしの配列を与えるとそれは ON 条件になる
            // ['on1' => 1, 'on2' => 2],
            'comment',
        ],
    ],
]);
// 右記と同じ: $db->select('t_article@active[article_id=9] AS A.article_id+t_comment:fkeyAC AS C.comment');

# subselect の最も複雑なものをバラして配列で指定する
$db->selectArray([
    't_article@latest[delete_flg=0] AS A' => [
        'article_id',
        // JOIN 記号のないキーはカラム取得ではなく subselect と解釈される
        't_comment AS C' => [
            'comment',
        ],
    ],
]);
// 右記と同じ: $db->selectArray('t_article@latest[delete_flg=0] AS A.article_id/t_comment AS C.comment');

さらに、このような取得をするのであれば、実際には :fkeyname[condition] は 第2引数の $where で渡したほうが分かりやすい。
JOIN のときもテーブル記法として書くよりは上記のようにキーなしで php の構文として指定したほうがはるかにミスが少ない。
もっと単純ならそもそも $db->select ではなく Gateway で取得したほうが手っ取り早いこともある。
以下に例を記す。

# base の最も複雑なものを引数で指定する
$db->select([
    't_article@active@latest A' => [
        'article_id',
        'T' => 'title',
    ]
], [
    'flag2'     => 1,
    'flag2 < ?' => 2,
]);
# base の最も複雑なものを Gateway で指定する
$db->t_article->as('A')->scope('active latest')->column([
    'article_id',
    'T' => 'title',
])->where([
    'flag2'     => 1,
    'flag2 < ?' => 2,
])->select();
// 2つとも右記と同じ: $db->select('t_article@active@latest[flag1: 1, "flag2 < ?": 2] AS A.article_id, title AS T');

# join の最も複雑なものを引数で指定する
$db->select([
    't_article@active A' => [
        'article_id',
        '+t_comment C' => [
            'comment',
        ],
    ]
], [
    'article_id' => 9,
]);
# join の最も複雑なものを Gateway で指定する
$db->t_article->as('A')->scope('active')->column([
    'article_id',
    '+t_comment' => $db->t_comment->as('C')->foreign('fkeyAC')->column('comment'),
])->where([
    'article_id' => 9,
])->select();
// 2つとも右記と同じ: $db->select('t_article@active[article_id=9] AS A.article_id+t_comment:fkeyAC AS C.comment');

# subselect の最も複雑なものを引数で指定する
$db->selectArray([
    't_article@latest A' => [
        'article_id',
        't_comment C' => [
            'comment',
        ],
    ]
], [
    'delete_flg' => 0,
]);
# subselect の最も複雑なものを Gateway で指定する
$db->t_article->as('A')->scope('latest')->column([
    'article_id',
    't_comment' => $db->t_comment->as('C')->column('comment'),
])->where([
    'delete_flg' => 0,
])->array();
// 2つとも右記と同じ: $db->selectArray('t_article@latest[delete_flg=0] AS A.article_id/t_comment AS C.comment');

ここまで来ると文字列ではなくほぼ php 構文になるのでかなり直感的になる。
テーブル記法については ryunosuke\dbml\Query\QueryBuilder::column()ryunosuke\dbml\Query\Expression\TableDescriptor にも記載があるのでそちらも参照。

テーブル名 ⇔ エンティティ名の自動変換

$db = new Database($connection, [
    // テーブル名 <=> エンティティの変換を行うクロージャを指定する
    'tableMapper'    => function ($tablename) {
        $entityname = ucfirst(preg_replace('#^t_#', '', $tablename));
        return [
            // キーが単一のエンティティ名として使用され、要素として使用されるエンティティクラスやゲートウェイクラスを指定できる
            $entityname => [
                'entityClass'  => 'vendor\\Entity\\' . $entityname,
                'gatewayClass' => 'vendor\\Gateway\\' . $entityname,
            ],
            // 複数返しても良い。その場合「テーブル名 => エンティティ」が1対多の関係になる
        ];
    },
    // デフォルトのエンティティやゲートウェイを使うなら文字列を返しても良い
    'tableMapper'    => function ($tablename) {
        return ucfirst(preg_replace('#^t_#', '', $tablename));
    },
]);

このような設定を行うと、内部で「DB テーブル名 ⇔ エンティティクラス名」の相互変換を行うことができる。
これによって「"t_article" テーブルは php 内で "Article" として扱う」のようなことが可能になる。

この設定の効果として、具体的には下記のコードが等価になる。

$db->selectArray('Article.*');
$db->selectArray('t_article.*');

$db->insert('Article', $dataarray);
$db->insert('t_article', $dataarray);

つまり、 SELECT 系クエリで引っ張るときに t_article は Article とみなされ、更新系クエリのときは Article は t_article とみなされるようになる。
結果的に「t_article テーブルから引っ張ったら自動で Article キーになってた」「Article キーで更新したら自動で t_article が更新されてた」という動作になる。
が、下記の制限から「アプリレイヤーによる自動エイリアス」と考えても差し支えない。端的に言えば「SQL レベルでエイリアスを明示しなくても "t_article" でも "Article" でもどっちでも認識する」ということになる。

変換は、変換前と変換後で決して同じ名前があってはならない。さらに、変換した結果が同じ文字列になるのも厳禁。
要するにエンティティ名 => テーブル名が曖昧になってはならない。

この機能はオンにしたところで「DB テーブル名 ⇔ エンティティクラス名の自動読み替え」程度の違いしか生まれず、その他の箇所にほとんど影響しない。
実装上、影響がある箇所は下記のみ。

影響箇所説明
t_article で select すると キーが Article で返ってくる単に返ってくるキーの違いであり、 自動でエンティティ化したりはしない。エンティティで欲しい場合は常に cast() を呼ぶ
t_ancestor.*** で取得する子供列がエンティティ名になる上記の派生。テーブル名を指定できない以上、エンティティで返すしかないため
$qb->cast(null) するとエンティティインスタンスを返すryunosuke\dbml\Query\QueryBuilder::cast() を参照
$db->Article が取得可能になるArticle にあたるものは本来テーブル名だが、エンティティ名でも TableGateway が取得できるようになる

最後の項目について補足すると t_article ⇔ Article というマッピングが存在するとして、

のどちらでも Gateway が得られるようになる。
メソッド体系などは全て同じだが、 array, tuple などの取得系メソッドの返り値の型が異なってくる。

上はプレーンな配列で1行を返すが、下は エンティティインスタンスで1行を返す。
その「エンティティインスタンス」とは tableMapper で指定した完全修飾クラス名である。

外部キーの扱いについて

TableA ⇔ TableBのような相互参照外部キーの場合は例外が飛ぶ。
したがってそのような場合は外部キー自動指定はできず、明示的にカラムを指定する必要がある。
(これは安全性のため。外部キーの定義順で動作が異なるような現象は気づきにくいバグの温床になる)。

TableA ⇔ TableBのような相互参照外部キーは早々無いだろうが、今後外部キーが追加されることを考えてただ通るだけのテストでもいいので何かしらで担保したほうが良い。

また、外部キーによるリレーションは「辿れる限り辿る」実装になっている。
下記のようなテーブルがあると仮定する。

関連α
tableA           tableB           tableC
                                   PK(auto)
                  PK(auto) <-----  FK
 PK(auto) <-----  FK

関連β
tableA           tableB           tableC
 PK1      <-----  PK1 & FK <-----  PK1 & FK
                  PK2      <-----  PK2 & FK
                                   PK3

関連αはいわゆる「サロゲートキー構成」で、関連βはいわゆる「ナチュラルキー構成」である。
関連αにおいて tableA と tableC に直接的な相関はない。相関を持たせるには必ず tableB を経由する必要がある。
一方、関連βは複合主キーがあり、 tableB を介さずとも tableA と tableC に関連がある、とみなすことができる。

この関連βのとき、 tableA と tableC は「外部キーによる相関がある」とみなされる。
つまり・・・

// 下記のコードを実行すると・・・
$db->tableA()->tableC()->array();

// 関連αの場合はエラー(tableA と tableC は相関がないので JOIN できない)
// 関連βの場合は辿れる(SELECT tableA.*,tableC.* FROM tableA INNER JOIN tableC ON tableA.PK1 = tableC.PK1)

となる。
この機構は外部キーを見る箇所全てで有効である(join, subselect, subexists など)。

自動カラムキャスト

autoCastType オプションを設定すると DB の型を活かして Doctrine\DBAL\Types\Type で変換して取得する。

// 具体的にはソースのコメントを参考
$db->setAutoCastType([
    // DATETIME 型は「取得時は変換」「更新時はそのまま」となるように設定
    Type::DATETIME => [
        'select' => true,
        'affect' => false,
    ],
    // SARRAY 型は「取得時も更新時も変換」となるように設定
    Type::SIMPLE_ARRAY => true,
]);
$row = $db->selectTuple('t_article', ['id' => 1]);
// t_article に public_time: DATETIME が定義されているとすると・・・
var_dump($row['public_time']);
// results: このようになぜか DateTime インスタンスで返してくれている
class DateTime#2 (3) {
  public $date =>
  string(26) "2017-12-07 21:42:56.000000"
  public $timezone_type =>
  int(3)
  public $timezone =>
  string(10) "Asia/Tokyo"
}

// t_article に public_option: SARRAY(実態は TEXT) が定義されているとすると・・・
var_dump($row['public_option']);
// results: このようになぜか配列で返してくれている
array(3) {
  [0] =>
  string(2) "10"
  [1] =>
  string(2) "30"
  [2] =>
  string(2) "50"
}
// さらに SARRAY は更新時も有効なので・・・
$db->insert('t_article', [
    'article_id'    => 1,
    'public_option' => ['10', '30', '50'],
]);
// このように insert に直接配列を突っ込むことができる(「Array to string conversion」などと怒られたりはしない)。

実際のところとんでもないほど強力な機能だが、その分パフォーマンスは劣化する(得られた全行全列に対して実行するので)。
また、 mysql のみ完全対応で、その他の DBMS はオマケのような位置付けになっている(一応それなりには動きはする)。
ただし、現在のところほぼグローバル設定で動作し、「テーブルごとに個別設定」のような動作は不可能。
これについては Gateway や Entity を利用して順次改善していく見込み。
(例えば Gateway のスコープに型情報を持たせたり、エンティティのフィールドの型でワイヤリングしたりなど)。

仮想カラム

ryunosuke\dbml\Database::overrideColumns() で「あたかもテーブルにあるかのように振る舞うカラム」を定義できる。

ありがちな例だが「姓」「名」を持つテーブルに対して overrideColumns(['usertable' => ['fullname' => new Expression('CONCAT(sei, mei)')]]); すると、あたかもフルネームカラムがあるように振る舞わせることができる。
使用例などはメソッドを参照。

原則として仮想カラムを引っ張るためには明示的な指定が必要で、 *!ignore で引っ張ったとしても取得列に含まれることはない。
ただし追加するときに implicit を true にすると取得列に含まれるようになる(それでも * は不可)。
仮想カラムを含めた全てを取得したい場合は '!' とする(ryunosuke\dbml\Query\QueryBuilder::column() を参照)。

明示使用の場合でも今のところ select, where, having でのみ使用可能。
orderBy は select に含めて指定すれば実現できるし、having も mysql であれば(設定次第で)直接式を指定することができるので、実質的には select, where でのみの使用となることが多いはず。

namespace ryunosuke\dbml\Entity

class ryunosuke\dbml\Entity::Entity

組み込みのデフォルトエンティティクラス

method ryunosuke\dbml\Entity\Entity::__call ($name, $arguments) : void

method ryunosuke\dbml\Entity\Entity::__isset ($name) : void

method ryunosuke\dbml\Entity\Entity::__unset ($name) : void

method ryunosuke\dbml\Entity\Entity::__get ($name) : void

method ryunosuke\dbml\Entity\Entity::__set ($name, $value) : void

method ryunosuke\dbml\Entity\Entity::offsetExists ($offset) : void

method ryunosuke\dbml\Entity\Entity::offsetUnset ($offset) : void

method ryunosuke\dbml\Entity\Entity::offsetGet ($offset) : void

method ryunosuke\dbml\Entity\Entity::offsetSet ($offset, $value) : void

method ryunosuke\dbml\Entity\Entity::getIterator () : void

method ryunosuke\dbml\Entity\Entity::jsonSerialize () : void

method ryunosuke\dbml\Entity\Entity::assign ($fields) : ryunosuke\dbml\Entity\Entityable

配列からプロパティをセットする

method ryunosuke\dbml\Entity\Entity::arrayize () : array

子要素も含めて再帰的に配列化する

interface ryunosuke\dbml\Entity::Entityable

エンティティであることを示すインターフェース

エンティティとして利用するには必ずこのインターフェースを実装しなければならない。

method ryunosuke\dbml\Entity\Entityable::assign ($fields) : ryunosuke\dbml\Entity\Entityableryunosuke\dbml\Entity\Entityable

配列からプロパティをセットする

method ryunosuke\dbml\Entity\Entityable::arrayize () : array

子要素も含めて再帰的に配列化する

method ryunosuke\dbml\Entity\Entityable::offsetExists ($offset) : void

method ryunosuke\dbml\Entity\Entityable::offsetGet ($offset) : void

method ryunosuke\dbml\Entity\Entityable::offsetSet ($offset, $value) : void

method ryunosuke\dbml\Entity\Entityable::offsetUnset ($offset) : void

namespace ryunosuke\dbml\Exception

class ryunosuke\dbml\Exception::InvalidCountException

行数系例外の親例外

property string ryunosuke\dbml\Exception\InvalidCountException::message

property integer ryunosuke\dbml\Exception\InvalidCountException::code

property NULL ryunosuke\dbml\Exception\InvalidCountException::file

property NULL ryunosuke\dbml\Exception\InvalidCountException::line

method ryunosuke\dbml\Exception\InvalidCountException::__construct ($message, $code, $previous) : void

method ryunosuke\dbml\Exception\InvalidCountException::__wakeup () : void

method ryunosuke\dbml\Exception\InvalidCountException::getMessage () : void

method ryunosuke\dbml\Exception\InvalidCountException::getCode () : void

method ryunosuke\dbml\Exception\InvalidCountException::getFile () : void

method ryunosuke\dbml\Exception\InvalidCountException::getLine () : void

method ryunosuke\dbml\Exception\InvalidCountException::getTrace () : void

method ryunosuke\dbml\Exception\InvalidCountException::getPrevious () : void

method ryunosuke\dbml\Exception\InvalidCountException::getTraceAsString () : void

method ryunosuke\dbml\Exception\InvalidCountException::__toString () : void

class ryunosuke\dbml\Exception::NonAffectedException

INSER/UPDATE/DELETE 操作で作用行が無かった時の例外クラス

property string ryunosuke\dbml\Exception\NonAffectedException::message

property integer ryunosuke\dbml\Exception\NonAffectedException::code

property NULL ryunosuke\dbml\Exception\NonAffectedException::file

property NULL ryunosuke\dbml\Exception\NonAffectedException::line

method ryunosuke\dbml\Exception\NonAffectedException::__construct ($message, $code, $previous) : void

method ryunosuke\dbml\Exception\NonAffectedException::__wakeup () : void

method ryunosuke\dbml\Exception\NonAffectedException::getMessage () : void

method ryunosuke\dbml\Exception\NonAffectedException::getCode () : void

method ryunosuke\dbml\Exception\NonAffectedException::getFile () : void

method ryunosuke\dbml\Exception\NonAffectedException::getLine () : void

method ryunosuke\dbml\Exception\NonAffectedException::getTrace () : void

method ryunosuke\dbml\Exception\NonAffectedException::getPrevious () : void

method ryunosuke\dbml\Exception\NonAffectedException::getTraceAsString () : void

method ryunosuke\dbml\Exception\NonAffectedException::__toString () : void

class ryunosuke\dbml\Exception::NonSelectedException

SELECT 操作で取得行が無かった時の例外クラス

property string ryunosuke\dbml\Exception\NonSelectedException::message

property integer ryunosuke\dbml\Exception\NonSelectedException::code

property NULL ryunosuke\dbml\Exception\NonSelectedException::file

property NULL ryunosuke\dbml\Exception\NonSelectedException::line

method ryunosuke\dbml\Exception\NonSelectedException::__construct ($message, $code, $previous) : void

method ryunosuke\dbml\Exception\NonSelectedException::__wakeup () : void

method ryunosuke\dbml\Exception\NonSelectedException::getMessage () : void

method ryunosuke\dbml\Exception\NonSelectedException::getCode () : void

method ryunosuke\dbml\Exception\NonSelectedException::getFile () : void

method ryunosuke\dbml\Exception\NonSelectedException::getLine () : void

method ryunosuke\dbml\Exception\NonSelectedException::getTrace () : void

method ryunosuke\dbml\Exception\NonSelectedException::getPrevious () : void

method ryunosuke\dbml\Exception\NonSelectedException::getTraceAsString () : void

method ryunosuke\dbml\Exception\NonSelectedException::__toString () : void

class ryunosuke\dbml\Exception::TooManyException

SELECT 操作で取得行が多かった時の例外クラス

property string ryunosuke\dbml\Exception\TooManyException::message

property integer ryunosuke\dbml\Exception\TooManyException::code

property NULL ryunosuke\dbml\Exception\TooManyException::file

property NULL ryunosuke\dbml\Exception\TooManyException::line

method ryunosuke\dbml\Exception\TooManyException::__construct ($message, $code, $previous) : void

method ryunosuke\dbml\Exception\TooManyException::__wakeup () : void

method ryunosuke\dbml\Exception\TooManyException::getMessage () : void

method ryunosuke\dbml\Exception\TooManyException::getCode () : void

method ryunosuke\dbml\Exception\TooManyException::getFile () : void

method ryunosuke\dbml\Exception\TooManyException::getLine () : void

method ryunosuke\dbml\Exception\TooManyException::getTrace () : void

method ryunosuke\dbml\Exception\TooManyException::getPrevious () : void

method ryunosuke\dbml\Exception\TooManyException::getTraceAsString () : void

method ryunosuke\dbml\Exception\TooManyException::__toString () : void

namespace ryunosuke\dbml\Gateway

class ryunosuke\dbml\Gateway::TableGateway

ゲートウェイクラス

Database の各種メソッドで「$table に自身に指定した」かのように動作する。
Database や QueryBuilder に実装されているメソッドは大抵利用できるが、コード補完に出ないメソッドはなるべく使用しないほうがよい。

// ゲートウェイはこのように Database 経由で取得する
$gw = $db->table_name;   // プロパティ版(素の状態で取得)
$gw = $db->table_name(); // メソッド版(引数で各句を指定可能)

// 全行全列を返す
$gw->array('*');
// id列の配列を返す
$gw->lists('id');

// 複合主キー(1, 2)で検索した1行を返す
$gw->find(1, 2);

// レコードが存在するか bool で返す
$gw->exists();
$gw->('*', ['status' => 'deleted']);
// id 列の最小値を返す
$gw->min('id');

// 自身と子供テーブルを階層化して返す
$gw->array([
    'childassoc' => $db->child(),
]);

// 自身と子供テーブルを JOIN して返す
$gw->array([
    // INNER JOIN
    '+children1' => $db->child(),
    // LEFT JOIN
    '<children2' => $db->child(),
]);

// 自身と子供テーブルの集計を返す
$gw->array([
    'subcount' => $db->child->subcount(),
    'submin'   => $db->child->submin('child_id'),
    'submax'   => $db->child->submax('child_id'),
    'subsum'   => $db->child->subsum('child_id'),
    'subavg'   => $db->child->subavg('child_id'),
]);

// 行を挿入する
$gw->insert(['data array']);
// 行を更新する
$gw->update(['data array'], ['where array']);
// 行を削除する
$gw->delete(['where array']);

// カラム値をインクリメント
$gw[1]['hoge_count'] += 1;                         // こういう指定もできるがこれは SELECT + UPDATE なので注意
$gw[1]['hoge_count'] = $db->raw('hoge_count + 1'); // 単純かつアトミックにやるならこうしなければならない

クエリスコープ

SELECT 句や WHERE 句のセットに名前をつけて、簡単に呼ぶことができる。

基本的には addScope で登録して scope で縛る。
addScope の引数はクエリビルダ引数と全く同じだが、第1引数のみ Closure を受け付ける。
Closure を受けたスコープはクエリビルダ引数を返す必要があるが、引数を受けられるのでパラメータ付きスコープを定義することができる。
また、 Closure 内の $this は「その時点の Gateway インスタンス」を指すように bind される。これにより $this->alias などが使用でき、当たっているスコープやエイリアス名などが取得できる。

scoping を使用するとスコープを登録せずにその場限りのスコープを当てることができる。
また column where orderBy などの個別メソッドがあり、句別にスコープを当てることもできる。

// デフォルトスコープを登録(select 時に常に `NOW()` が付いてくるようになる)
$gw->addScope('', 'NOW()');
// 有効レコードスコープを登録(select 時に `WHERE delete_flg=0` が付くようになる)
$gw->addScope('active', [], ['delete_flg' => 0]);
// 最新レコードスコープを登録(select 時に `ORDER BY create_date DESC LIMIT 10` が付くようになる)
$gw->addScope('latest', function ($limit = 10) {
    return [
        'orderBy' => 'create_date DESC',
        'limit'   => $limit,
    ];
});

// 有効レコードを全取得する('active' スコープで縛る)
$gw->scope('active')->array();
// → SELECT NOW(), t_table.* FROM t_table WHERE t_table.delete_flg = 0
// NOW() が付いているのはデフォルトスコープが有効だから

// デフォルトスコープを無効化して active, latest で縛る
$gw->noscope()->scope('active')->scope('latest')->array();
// → SELECT t_table.* FROM t_table WHERE t_table.delete_flg = 0 ORDER BY t_table.create_date DESC LIMIT 10
// これでも同じ。複数のスコープはスペース区切りで同時指定できる
$gw->noscope()->scope('active latest')->array();

// Closure なスコープはパラメータを指定できる
$gw->scope('latest', 9)->array();
// → SELECT NOW(), t_table.* FROM t_table ORDER BY t_table.create_date DESC LIMIT 9

// スコープを登録せず、その場限りのものとして縛る
$gw->scoping('id', ['invalid_flg' => 1], 'id DESC')->array();
// → SELECT id FROM t_table WHERE t_table.invalid_flg = 1 ORDER BY id DESC
// それぞれの句の個別メソッドもある
$gw->column('id')->where(['invalid_flg' => 1])->array();
// → SELECT id FROM t_table WHERE t_table.invalid_flg = 1

// スコープは insert/update/delete にも適用できる
$gw->scope('active')->update(['column' => 'data']);
// → UPDATE t_table SET column = 'data' WHERE t_table.delete_flg = 0

insert/update/delete に当たるスコープの仕様はかなり上級者向けなので、基本的には「where が当たる」という認識でよい。
そもそも insert/update/delete に対してスコープを当てる機会自体が稀だと思うので、基本的には気にしなくてもよい。
(スコープを当てない insert/update/delete は通常通りの動作)。

insert/update/delete にスコープを当てるときはデフォルトスコープに注意。
ありがちなのは上記の例で言うと delete_flg = 0 をデフォルトスコープにしているときで、このとき $gw->update(['delete_flg' => 1], ['primary_id' => 99]) として無効化しようとしても無効化されない。
デフォルトスコープの delete_flg = 0 が当たってヒットしなくなるからである。
基本的に insert/update/delete にスコープを当てるときは noscopeunscope でデフォルトスコープを外したほうが無難。

スコープが当たっているクエリビルダは select メソッドで取得できる。
ただ1点注意として、スコープを当ててもオリジナルのインスタンスは変更されない。変更が適用された別のインスタンスを返す。
下記のコードが分かりやすい。

// これは誤り
$gw->scope('active');
$gw->array();
// → `SELECT * FROM table_name` となり、スコープが当たっていない

// これが正しい
$gw = $gw->scope('active');
$gw->array();
// → `SELECT * FROM table_name WHERE table_name.delete_flg = 0` となり、スコープが当たっている

// あるいはメソッドチェーンでも良い(良い、というかそれを想定している)
$gw->scope('active')->array();

Traversable, Countable

Traversable と Countable を実装しているので、 foreach で回すことができるし count() で件数取得もできる。

// active スコープを foreach で回す
foreach ($gw->scope('active') as $item) {
    var_dump($item);
}

// active スコープの件数を取得
$gw->count();

foreach で回すときのメソッドはデフォルトで array。 これは $defaultIteration で変更できる。
$defaultIteration は複数設定できる箇所があるが、下記の優先順位となる。

下に行くほど優先される。要するに単純に個別で指定するほど強い。

count() は count($gw)$gw->count('*') で挙動が異なる(ryunosuke\dbml\Gateway\TableGateway::count() を参照)

JOIN

メソッドコール or マジックゲット or マジックコールを使用して JOIN を行うことができる。
それぞれできる範囲と記法が異なり、特色がある(メソッドコールは冗長、マジックゲットは end がウザイ、マジックコールはエイリアスが張れない など)。

# メソッドコール(すべての基本。これがベースであり多少冗長になるが出来ないことはない)
$db->t_article->join('inner', $db->t_comment, [$oncond])->array();

# マジックゲット(テーブル名でアクセスすると「自身に対象を JOIN して対象を返す」という動作になる)
// end() が必要
$db->t_article->t_comment->end()->array();
// end() がないと SELECT * FROM t_comment になる。なぜなら「t_article に t_comment を JOIN して t_comment を返す」という動作なので、t_comment は何も作用していない。つまり t_comment に対して array() しているだけである
$db->t_article->t_comment->array();
// このように「JOIN 対象に何らかの操作を行いたい」場合はマジックゲットが便利
$db->t_article->t_comment->as('C')->scope('active')->orderBy('id')->end()->array();

# マジックコール(テーブル名でコールすると「自身に対象を JOIN して自身を返す」という動作になる)
// 「自身を返す」ので end() は不要
$db->t_article->t_comment()->array();
// 「自身を返す」ので t_user は t_article に JOIN される
$db->t_article->t_comment()->t_user()->array();
// 引数には scoping 引数が使える
$db->t_article->t_comment('id, comment', ['id' => 3])->array();

# マジックゲット+オフセットアクセス+invoke を使用した高度な例
$db->t_article->t_comment['@active AS C']()->array();

厳密にやりたいならメソッドコール、ある程度条件を付与したいならマジックゲット、とにかく単に JOIN して引っ張りたいだけならマジックコールが適している。

マジック系 JOIN の 外部結合・内部結合は $defaultJoinMethod で決定する(メソッドコールは専用のメソッドが生えている)。
$defaultJoinMethod に INNER, LEFT などの文字列を設定するとそれで結合される。
ただし、特殊な結合モードとして "AUTO" がある。 AUTO JOIN は「外部キーカラム定義」に基づいて自動で INNER or LEFT を決定する。
極めて乱暴に言えば「他方が見つからない可能性がある場合」に LEFT になる(カラム定義や親子関係を見て決める)。
基本的にはこの動作で問題なく、明示指定より AUTO の方が優れているが、他の結合条件によっては「共に NOT NULL だけど結合したら他方が NULL」になる状況はありうるため、完全に頼り切ってはならない。

JOIN の時、スコープがあたっている場合は下記の動作になる。

clause説明
columnJOIN 時の取得カラムとして使用される
whereON 句として使用される
orderBy駆動表の ORDER 句に追加される
limit, groupBy, havingこれらが一つでも指定されている場合はそれらを適用したサブクエリと JOIN される。この際、上記の where -> ON の適用は行われない(サブクエリに内包される)

「where が ON 句として使用される」はとても重要な性質で、これを利用することで外部キー結合しつつ、追加条件を指定することが出来るようになる。
「駆動表の ORDER 句に追加」もそれなりに重要で、 RDBMS における JOIN は本質的には順序を持たないが、駆動表に追加することで擬似的に順序付きを実現できる。

limit, having などがサブクエリ化されるのはこれらが指定されているときのテーブルとしての JOIN は本質的に不可能だからである。
場合によっては非常に非効率なクエリになるので注意。
また、その性質上、外部キー結合をすることはできない。

property string ryunosuke\dbml\Gateway\TableGateway::defaultIteration

デフォルト iterate メソッド

property string ryunosuke\dbml\Gateway\TableGateway::defaultJoinMethod

デフォルト JOIN メソッド

method ryunosuke\dbml\Gateway\TableGateway::getDefaultOptions () : array

オプションのデフォルト値を返す static メソッド

このメソッドの返り値が構成要素とデフォルト値を担っていて、その配列以外のキーは基本的に保持できない。

method ryunosuke\dbml\Gateway\TableGateway::__construct ($database, $table_name, $entity_name = null) : void

コンストラクタ

method ryunosuke\dbml\Gateway\TableGateway::__get ($name) : ryunosuke\dbml\Gateway\TableGateway

自身と指定先テーブルを JOIN する

返り値として「JOIN したテーブルの Gateway」を返す。
JOIN 先に対してなにかしたい場合は ryunosuke\dbml\Gateway\TableGateway::end() が必要。冒頭の「メソッドコール or マジックゲット or マジックコール」も参照。

method ryunosuke\dbml\Gateway\TableGateway::__set ($name, $value) : void

サポートされない

将来のために予約されており、呼ぶと無条件で例外を投げる。

method ryunosuke\dbml\Gateway\TableGateway::__invoke ($tableDescriptor = [], $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : ryunosuke\dbml\Gateway\TableGatewayarrayryunosuke\dbml\Entity\Entityablemixed

scoping + end する

引数で scoping(...func_get_args()) したあと end(1) することで JOIN先 Geteway を返す。

冒頭に記載の通り、 マジックコールは「自身に対象を JOIN して自身」を返す。
引数は各句を表すので、エイリアス(AS A)やスコープを適用することが出来ない

つまり、ただ呼び出すだけで無意味なように思えるが、これがあることで $db->t_table['@scope AS T']('column', 'where') のような記法が可能になっている。

サンプルは ryunosuke\dbml\Gateway\TableGateway::offsetGet() を参照。

method ryunosuke\dbml\Gateway\TableGateway::__toString () : string

完全なクエリ文字列を返す

エスケープ済みで実行可能なクエリを返す。

// SELECT * FROM t_table WHERE t_table.primary_id = '1'
echo $gw->pk(1);
// SELECT T.id, T.title FROM t_table T WHERE T.create_at = '2014-03-31' LIMIT 1
echo $gw->as('T')->column(['id', 'title'])->where(['create_at' => '2014-03-31'])->limit(1);

method ryunosuke\dbml\Gateway\TableGateway::offsetExists ($offset) : bool

なにがしかの存在を返す

$offset が数値・配列なら主キーとみなして行の存在を返す。
$offset がそれ以外ならカラムの存在を返す。

# 行の存在を確認する
$exists1 = isset($gw[1]);      // 単一主キー値1のレコードがあるなら true
$exists2 = isset($gw[[1, 2]]); // 複合主キー値[1, 2]のレコードがあるなら true

# カラムの存在を確認する
$exists1 = isset($gw['article_title']);    // true
$exists2 = isset($gw['undefined_column']); // false

method ryunosuke\dbml\Gateway\TableGateway::offsetGet ($offset) : ryunosuke\dbml\Gateway\TableGatewayarrayryunosuke\dbml\Entity\Entityablemixed

なにがしかの値を取得する

$offset が数値・配列なら主キーとみなして where する(≒pk)。
$offset が '' なら指定とみなしてレコードを返す(≒tuple)。
$offset が半角英数字ならカラムとみなしてカラム値を返す(≒value)。
$offset がテーブル記法ならその記法が適用された自分自身を返す。
テーブル記法のうち、 [condition] だけであれば [] が省略可能となる。

# 数値・配列なら pk (where) と同義
$row = $gw[1]->tuple();      // 単一主キー値1のレコードを返す
$row = $gw[[1, 2]]->tuple(); // 複合主キー値[1, 2]のレコードを返す
$row = $gw->find($pk);       // 上2つは実質的にこれの糖衣構文

# レコードを返す
$row = $gw['*'];
// ただし、WHERE を指定しないとエラーになるので通常はこのように使用する
$row = $gw->[1]['*'];  // 主キー=1 の全カラムを返す(SELECT * FROM t_table WHERE id = 1)
$row = $gw->[1]['**']; // 怠惰取得も可能(怠惰取得については QueryBuilder::column() を参照)

# カラム値を返す
$title = $gw['article_title'];
// ただし、WHERE を指定しないとほぼ意味がないので通常はこのように使用する
$title = $gw->pk(1)['article_title'];
$title = $gw->scope('scopename')['article_title'];

# スコープとエイリアスが適用された自分自身を返す
$gw = $gw['@scope1@scope2 AS GW'];
$gw = $gw->scope('scope1')->scope('scope2')->as('GW'); // 上記は実質的にこれと同じ

# エイリアスやカラムも指定できるのでこういった面白い指定も可能
$gw['G.id']->array();
// SELECT G.id FROM t_table G

# [condition] だけであれば [] は不要。下記はすべて同じ意味になる
$gw = $gw['[id: 123]']; // 本来であればこのように指定すべきだが・・・
$gw = $gw['id: 123'];   // [] は省略可能([] がネストしないのでシンタックス的に美しくなる)
$gw = $gw['id=123'];    // 素の文字列が許容されるならこのようにすると属性アクセスしてるように見えてさらに美しい
$gw = $gw->where(['id' => 123]); // あえてメソッドモードで指定するとしたらこのようになる

# invoke と組み合わせると下記のようなことが可能になる
$db->t_article->t_comment['@scope1@scope2 AS C']($column, $where);

method ryunosuke\dbml\Gateway\TableGateway::offsetSet ($offset, $value) : intarray

なにがしかの値を設定する

$offset が null なら ryunosuke\dbml\Gateway\TableGateway::insert() になる。
$offset が数値・配列なら ryunosuke\dbml\Gateway\TableGateway::modify() になる。
$offset が半角英数字ならカラムの ryunosuke\dbml\Gateway\TableGateway::update() になる。

# 1行 insert
$gw[] = [$dataarray]; // $dataarray が insert される

# 1行 modify
$gw[1] = [$dataarray];      // $gw->modify([$dataarray] + [pcol => 1])
$gw[[1, 2]] = [$dataarray]; // $gw->modify([$dataarray] + [pcol1 => 1, pcol2 => 2])

# 記事のタイトルを設定する
$gw['article_title'] = 'タイトル';
// ただし、WHERE を指定しないと全行更新され大事故になるので通常は下記のように何らかで縛って使用する
$gw->scope('scopename')['article_title'] = 'タイトル';
$gw['id: 1']['article_title'] = 'タイトル';
$gw->pk(1)['article_title'] = 'タイトル';
$gw[1]['article_title'] = 'タイトル';

method ryunosuke\dbml\Gateway\TableGateway::offsetUnset ($offset) : intarray

なにがしかの値を削除する

$offset が数値・配列なら主キー指定の ryunosuke\dbml\Gateway\TableGateway::delete() になる。
それ以外は例外を投げる。

# 主キーで削除
unset($gw[1]);      // 単一主キー値1のレコードを削除する
unset($gw[[1, 2]]); // 複合主キー値[1, 2]のレコードを削除する

method ryunosuke\dbml\Gateway\TableGateway::clone ($force = false) : ryunosuke\dbml\Gateway\TableGateway

コピーインスタンスを返す

「コピーインスタンス」とは「オリジナルではないインスタンス」のこと。
オリジナルでなければコピーなので複数回呼んでも初回以外は同じインスタンスを返す。
それを避けるには $force に true を渡す必要がある。

method ryunosuke\dbml\Gateway\TableGateway::describe () : Doctrine\DBAL\Schema\Table

自身の Table オブジェクトを返す

method ryunosuke\dbml\Gateway\TableGateway::as ($alias) : ryunosuke\dbml\Gateway\TableGateway

テーブルエイリアス名を設定する

// SELECT * FROM tablename AS hoge_alias
echo $gw->as('hoge_alias');

method ryunosuke\dbml\Gateway\TableGateway::end ($back = 0) : ryunosuke\dbml\Gateway\TableGateway

join の起点オブジェクトを返す

jQuery の end() を想像すると分かりやすいかもしれない。

なお、引数で戻る回数を指定できる。省略した場合は全て戻る。

# この $select は t_child のビルダを指す(__get はそれ自身を返すから)
$select = $db->t_parent->t_child->select();

# この $select は t_parent のビルダを指す(end() することで join 先を辿るから)
$select = $db->t_parent->t_child->end()->select();

# この $select は t_child のビルダを指す(1回を指定してるから)
$select = $db->t_parent->t_child->t_grand->end(1)->select();

method ryunosuke\dbml\Gateway\TableGateway::tableName () : string

実テーブル名を返す

method ryunosuke\dbml\Gateway\TableGateway::alias ($alias = null) : ryunosuke\dbml\Gateway\TableGatewaystring

select の際に使用されるエイリアス名を設定・取得する

引数を与えると setter, 与えないと getter として動作する。
setter の場合は自分自身を返す。

method ryunosuke\dbml\Gateway\TableGateway::foreign ($foreign = null) : ryunosuke\dbml\Gateway\TableGatewaystring

select の際に使用される外部キーを設定・取得する

引数を与えると setter, 与えないと getter として動作する。
setter の場合は自分自身を返す。

method ryunosuke\dbml\Gateway\TableGateway::hint ($hint = null) : ryunosuke\dbml\Gateway\TableGatewaystring

インデックスヒントを設定・取得する

引数を与えると setter, 与えないと getter として動作する。
setter の場合は自分自身を返す。

method ryunosuke\dbml\Gateway\TableGateway::modifier () : string

エイリアス指定されているならそれを、されていないならテーブル名を返す

// t_tablename
echo $gw->modifier();
// T
echo $gw->as('T')->modifier();

method ryunosuke\dbml\Gateway\TableGateway::join ($type, $gateway, $on = [], $fkeyname = null) : ryunosuke\dbml\Gateway\TableGateway

結合タイプや結合条件、外部キーを指定して JOIN する

実際は下記のようなエイリアスメソッドが定義されているのでそちらを使うことが多く、明示的に呼ぶことはほとんどない。
さらにクラス冒頭に記載の通りマジックゲットやマジックコールの方が平易なシンタックスになるため、ますます出番は少ない。

# joinOn は innerJoinOn のエイリアス
$db->t_from->joinOn($db->t_join, ['hoge = fuga']);
// SELECT t_from.* FROM t_from INNER JOIN t_join ON hoge = fuga

# leftJoinOn を使うと LEFT を明示できる
$db->t_from->leftJoinOn($db->t_join, ['hoge = fuga']);
// SELECT t_from.* FROM t_from LEFT JOIN t_join ON hoge = fuga

# joinForeign は autoJoinForeign のようなもの(外部キー定義によって INNER か AUTO かが自動で決まる)
$db->t_from->joinForeign($db->t_join);
// SELECT t_from.* FROM t_from INNER JOIN t_join ON t_from.foreign_col = t_join.foreign_col

# leftJoinForeign を使うと LEFT を明示できる
$db->t_from->leftJoinForeign($db->t_join);
// SELECT t_from.* FROM t_from LEFT JOIN t_join ON t_from.foreign_col = t_join.foreign_col

# joinForeignOn は autoJoinForeignOn のようなもの(外部キー定義によって INNER か AUTO かが自動で決まる)
$db->t_from->joinForeignOn($db->t_join, ['hoge = fuga']);
// SELECT t_from.* FROM t_from INNER JOIN t_join ON (t_from.foreign_col = t_join.foreign_col) AND (hoge = fuga)

# leftJoinForeignOn を使うと LEFT を明示できる
$db->t_from->leftJoinForeignOn($db->t_join, ['hoge = fuga']);
// SELECT t_from.* FROM t_from LEFT JOIN t_join ON (t_from.foreign_col = t_join.foreign_col) AND (hoge = fuga)

method ryunosuke\dbml\Gateway::joinOn ($table, $on = []) : ryunosuke\dbml\Gateway\TableGateway

結合方法が INNER で結合条件指定の join()

method ryunosuke\dbml\Gateway::innerJoinOn ($table, $on = []) : ryunosuke\dbml\Gateway\TableGateway

結合方法が INNER で結合条件指定の join()

method ryunosuke\dbml\Gateway::leftJoinOn ($table, $on = []) : ryunosuke\dbml\Gateway\TableGateway

結合方法が LEFT で結合条件指定の join()

method ryunosuke\dbml\Gateway::rightJoinOn ($table, $on = []) : ryunosuke\dbml\Gateway\TableGateway

結合方法が RIGHT で結合条件指定の join()

method ryunosuke\dbml\Gateway::joinForeign ($table, $fkeyname = null) : ryunosuke\dbml\Gateway\TableGateway

結合方法が AUTO で外部キー指定の join()

method ryunosuke\dbml\Gateway::innerJoinForeign ($table, $fkeyname = null) : ryunosuke\dbml\Gateway\TableGateway

結合方法が INNER で外部キー指定の join()

method ryunosuke\dbml\Gateway::leftJoinForeign ($table, $fkeyname = null) : ryunosuke\dbml\Gateway\TableGateway

結合方法が LEFT で外部キー指定の join()

method ryunosuke\dbml\Gateway::rightJoinForeign ($table, $fkeyname = null) : ryunosuke\dbml\Gateway\TableGateway

結合方法が RIGHT で外部キー指定の join()

method ryunosuke\dbml\Gateway::joinForeignOn ($table, $on = [], $fkeyname = null) : ryunosuke\dbml\Gateway\TableGateway

結合方法が AUTO で結合条件・外部キー指定の join()

method ryunosuke\dbml\Gateway::innerJoinForeignOn ($table, $on = [], $fkeyname = null) : ryunosuke\dbml\Gateway\TableGateway

結合方法が INNER で結合条件・外部キー指定の join()

method ryunosuke\dbml\Gateway::leftJoinForeignOn ($table, $on = [], $fkeyname = null) : ryunosuke\dbml\Gateway\TableGateway

結合方法が LEFT で結合条件・外部キー指定の join()

method ryunosuke\dbml\Gateway::rightJoinForeignOn ($table, $on = [], $fkeyname = null) : ryunosuke\dbml\Gateway\TableGateway

結合方法が RIGHT で結合条件・外部キー指定の join()

method ryunosuke\dbml\Gateway\TableGateway::dryrun () : ryunosuke\dbml\Gateway\TableGateway

dryrun モードに移行する

Gateway 版の ryunosuke\dbml\Database::dryrun()

method ryunosuke\dbml\Gateway\TableGateway::addScope ($name = "", $tableDescriptor = [], $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : ryunosuke\dbml\Gateway\TableGateway

スコープを定義する

空文字のスコープはデフォルトスコープとなり、デフォルトで適用されるようになる。

スコープはオリジナルに対しても反映される(インスタンス間で共用される)。

$gw = $db->t_article->as('A');
$gw->addScope('scopename', []);
// $db->t_article と $gw は(as してるので)別インスタンスだが、 $gw で定義したスコープはオリジナルでも使用することができる
$gw2 = $db->t_article->scope('scopename');

method ryunosuke\dbml\Gateway\TableGateway::mixScope ($name, $sourceScopes) : ryunosuke\dbml\Gateway\TableGateway

スコープを合成する(スコープを利用してスコープを定義する)

合成スコープの引数は「元スコープの引数が足りない場合に補うように」動作する。
しかしそもそも優先順位がややこしいので使用は推奨しない。
動的を動的のまま合成したいことはあまりないと思うので、合成時に引数を完全に指定するのがもっとも無難。

# 既にスコープ a, b, c が登録されているとする

// このようにスコープ当てるように合成できる
$gw->mixScope('mixedABC', 'a b c');

// 既存スコープが動的スコープなら引数を与えることができる
$gw->mixScope('mixedABC', [
    'a' => [1 ,2 ,3], // スコープ a の引数
    'b' => [4, 5, 6], // スコープ a の引数
    'c' => [7, 8 ,9], // スコープ a の引数
]);

// いずれにせよ合成したスコープは普通のスコープと同じように使用できる
$gw->scope('mixedABC')->array();
// 実質的にこのように使用時に全部当てることと同義だが、頻出するなら使用時に複数を当てるよりも定義したほうが保守性が高くなる
$gw->scope('a b c')->array();

method ryunosuke\dbml\Gateway\TableGateway::scoping ($tableDescriptor = [], $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : ryunosuke\dbml\Gateway\TableGateway

スコープの追加と縛りを同時に行う

実際は ryunosuke\dbml\Gateway\TableGateway::column(), ryunosuke\dbml\Gateway\TableGateway::where() 等の句別メソッドを使うほうが多い。

// 下記は同じ(スコープ名は自動で決まる≒使い捨てスコープ)
$gw->addScope('hoge', 'column', 'where', 'order', 99, 'group', 'having')->scope('hoge')->array();
$gw->scoping('column', 'where', 'order', 99, 'group', 'having')->array();

method ryunosuke\dbml\Gateway::column ($tableDescriptor) : ryunosuke\dbml\Gateway\TableGateway

SELECT 句を追加する(ryunosuke\dbml\Query\QueryBuilder::column() を参照)

// SELECT id, name FROM tablename
echo $gw->column('id, name');

method ryunosuke\dbml\Gateway::where ($where) : ryunosuke\dbml\Gateway\TableGateway

WHERE 句を追加する(ryunosuke\dbml\Query\QueryBuilder::where() を参照)

// SELECT * FROM tablename WHERE id = 99
echo $gw->where(['id' => 99]);

method ryunosuke\dbml\Gateway::orderBy ($orderBy) : ryunosuke\dbml\Gateway\TableGateway

ORDER BY 句を追加する(ryunosuke\dbml\Query\QueryBuilder::orderBy() を参照)

// SELECT * FROM tablename ORDER BY id ASC
echo $gw->orderBy(['id']);

method ryunosuke\dbml\Gateway::limit ($limit) : ryunosuke\dbml\Gateway\TableGateway

LIMIT 句を追加する(ryunosuke\dbml\Query\QueryBuilder::limit() を参照)

// SELECT * FROM tablename LIMIT 50 OFFSET 40
echo $gw->limit([40 => 50]);

method ryunosuke\dbml\Gateway::groupBy ($groupBy) : ryunosuke\dbml\Gateway\TableGateway

GROUP BY 句を追加する(ryunosuke\dbml\Query\QueryBuilder::groupBy() を参照)

// SELECT * FROM tablename GROUP BY group_key
echo $gw->groupBy('group_key');

method ryunosuke\dbml\Gateway::having ($having) : ryunosuke\dbml\Gateway\TableGateway

HAVING 句を追加する(ryunosuke\dbml\Query\QueryBuilder::having() を参照)

// SELECT * FROM tablename HAVING id = 99
echo $gw->having(['id' => 99]);

method ryunosuke\dbml\Gateway\TableGateway::scope ($name = "", $variadic_parameters = []) : ryunosuke\dbml\Gateway\TableGateway

スコープで縛る

スコープは空白区切りで複数指定できる。
第2引数はクロージャによる動的スコープの引数となる。

# scope1 と scope 2 を当てる
$gw->scope('scope1 scope2');

# 動的スコープにパラメータを与えて当てる
$gw->scope('scopename', 5);

# 配列指定で複数の動的スコープにパラメータを与えて当てる
$gw->scope([
    'scope1' => 1,          // 本来は引数を配列で与えるが、配列でない場合は配列化される([1]と同義)
    'scope2' => ['a', 'b'], // 'a' が第1引数、'b' が第2引数の意味になる
    'scope3',               // パラメータなしスコープも同時指定できる
]);

パラメータ有りを含むスコープをスペース区切りで同時に当てた場合は全てのスコープに引数が渡る。
意図しない挙動になり得るのでその場合は配列指定で当てたほうが良い。

method ryunosuke\dbml\Gateway\TableGateway::unscope ($name = "") : ryunosuke\dbml\Gateway\TableGateway

名前指定でスコープを外す

スコープは空白区切りで複数指定できる。

# 特に意味はないが、スコープを当てて外すコード
$gw->scope('scope1 scope2')->unscope('scope1 scope2');

method ryunosuke\dbml\Gateway\TableGateway::noscope () : ryunosuke\dbml\Gateway\TableGateway

デフォルトスコープを含め、縛っているスコープをすべて解除する

method ryunosuke\dbml\Gateway\TableGateway::getScopeParts ($name = "", $variadic_parameters = []) : array

スコープのクエリ引数を得る

スコープは基本的に固定的だが、クロージャを与えたときのみ動的になる。
$variadic_parameters を与えるとそれを引数として渡す(普通に scope した時の動作)。
ただし、自身に既に当たっている場合はそれが使用される(引数を与えると上書きされる)。

# 静的スコープ
$gw->addScope('scope1', 'NOW()', 'cond');
$gw->getScopeParts('scope1');
// result: 単純にパーツ配列が得られる
[
    'column'  => 'NOW()',
    'where'   => 'cond',
    'orderBy' => [],
    'limit'   => [],
    'groupBy' => [],
    'having'  => [],
];

# 動的スコープ
$gw->addScope('scope2', function ($id) {
    return [
        'column' => 'NOW()',
        'where'  => ['col' => $id],
    ];
});
$gw->getScopeParts('scope2', 123);
// result:
[
    'column'  => 'NOW()',
    'where'   => ['col' => 123],
    'orderBy' => [],
    'limit'   => [],
    'groupBy' => [],
    'having'  => [],
];

method ryunosuke\dbml\Gateway\TableGateway::getScopeParams ($tableDescriptor = [], $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : array

現スコープのクエリビルダ引数を取得する

引数は全て省略できる。省略した場合結果はスコープのもののみとなる。
指定した場合は追加でスコープを指定したように振舞う。

method ryunosuke\dbml\Gateway\TableGateway::pk (...$variadic) : ryunosuke\dbml\Gateway\TableGateway

主キー値指定の where メソッド

主キーの値だけを与えて ryunosuke\dbml\Gateway\TableGateway::where() する。
可変引数で複数の主キー値を与えることができる。

単一主キーの場合でもそれなりに有用だし、複合主キーの場合は劇的に記述を減らすことができる。
さらに複合主キーの場合は主キー値が足りなくても良い。その場合、指定された分だけで where する。
ただし、多い場合は例外を投げる。

# 単一主キー値を1つ指定(下記は等価になる)
$gw->pk(1);               // 配列で指定
$gw->where(['pid' => 1]); // where で指定
// SELECT * FROM t_table WHERE (pid = 1)

# 単一主キー値を可変引数で2つ指定(下記は等価になる)
$gw->pk(1, 2);                 // 配列で指定
$gw->where(['pid' => [1, 2]]); // where で指定
// SELECT * FROM t_table WHERE (pid = 1 OR pid = 2)

# 複合主キー値を1つ指定(下記は等価になる)
$gw->pk([1, 1]);                           // 配列で指定
$gw->where(['mainid' => 1, 'subid' => 1]); // where で指定
// SELECT * FROM t_table WHERE (mainid = 1 AND subid = 1)

# 複合主キー値を可変引数で2つ指定(下記は等価になる)
$gw->pk([1, 1], [2, 2]); // 配列で指定
$gw->where([             // where で指定
    [
        ['mainid' => 1, 'subid' => 1],
        ['mainid' => 2, 'subid' => 2],
    ]
]);
// SELECT * FROM t_table WHERE (mainid = 1 AND subid = 1) OR (mainid = 2 AND subid = 2)

# 欠けた複合主キー値を可変引数で2つ指定(下記は等価になる)
$gw->pk([1], [2, 2]); // 配列で指定
$gw->where([       // where で指定
    [
        ['mainid' => 1],
        ['mainid' => 2, 'subid' => 2],
    ]
]);
// SELECT * FROM t_table WHERE (mainid = 1) OR (mainid = 2 AND subid = 2)

method ryunosuke\dbml\Gateway\TableGateway::uk (...$variadic) : ryunosuke\dbml\Gateway\TableGateway

一意キー値指定の where メソッド

一意キーの値だけを与えて ryunosuke\dbml\Gateway\TableGateway::where() する。
可変引数で複数の一意キー値を与えることができる。

主キーは一意キーとはみなされない(主キーは pk があるので、このメソッドを使うメリットがない)。
使い方は pk とほぼ同じ。ただし、主キーと違い一意キーは複数個の存在が許容されるので使い方のルールがある。

一意キーが1つしか存在しない場合はシンプルにそのキーを使う。
一意キーが2つ以上存在する場合は型がすべて一致するものを使う。
いずれにせよ引数の数と一意キーのカラム数が一致しないものは使われない。

# 下記は等価
$gw->uk([1, 2]); // 配列で指定
$gw->where(['unique_id1' => 1, 'unique_id2' => 2]); // where で指定
// SELECT * FROM t_table WHERE (unique_id1 = 1) AND (unique_id2 = 2)

# このような使い方を想定している
$gw->uk('mail@address'); // 一意キーの値が 'mail@address' のレコード
// SELECT * FROM t_user WHERE mailaddress = 'mail@address'

# 複数指定も可
$gw->uk('mail1@address', 'mail2@address');
// SELECT * FROM t_user WHERE mailaddress = 'mail1@address' OR mailaddress = 'mail2@address'

method ryunosuke\dbml\Gateway\TableGateway::count ($column = [], $where = [], $groupBy = [], $having = []) : int

レコード件数を返す

件数取得は下記の2種類の方法が存在する。

  1. count($gw);
  2. $gw->count('*');

1 は php 標準の count() 関数フックであり、レコードをフェッチしてその件数を返す。
2 は メソッドコールであり、COUNT クエリを発行する。
当たっている WHERE が同じであれば結果も同じになるが、その内部処理は大きく異なる。

内部的にメソッド呼び出しと count 呼び出しを判断する術がないので引数で分岐している。

method ryunosuke\dbml\Gateway::min ($column, $where = [], $groupBy = [], $having = []) : intfloat

駆動表を省略できる ryunosuke\dbml\Database::min()

method ryunosuke\dbml\Gateway::max ($column, $where = [], $groupBy = [], $having = []) : intfloat

駆動表を省略できる ryunosuke\dbml\Database::max()

method ryunosuke\dbml\Gateway::sum ($column, $where = [], $groupBy = [], $having = []) : intfloat

駆動表を省略できる ryunosuke\dbml\Database::sum()

method ryunosuke\dbml\Gateway::avg ($column, $where = [], $groupBy = [], $having = []) : intfloat

駆動表を省略できる ryunosuke\dbml\Database::avg()

method ryunosuke\dbml\Gateway\TableGateway::chunk ($count, $column = null) : \Generator

分割して sequence してレコードジェネレータを返す

Gateway 版の ryunosuke\dbml\Query\QueryBuilder::chunk()

method ryunosuke\dbml\Gateway\TableGateway::getEmptyRecord ($default = []) : arrayryunosuke\dbml\Entity\Entityable

空レコードを返す

Gateway 版の ryunosuke\dbml\Database::getEmptyRecord()

method ryunosuke\dbml\Gateway\TableGateway::gather ($wheres = [], $other_wheres = [], $parentive = false) : array

レコード情報をかき集める

Gateway 版の ryunosuke\dbml\Database::gather()

method ryunosuke\dbml\Gateway\TableGateway::insert ($data) : intstringarrayryunosuke\dbml\Query\Statement

駆動表を省略できる ryunosuke\dbml\Database::insert()

method ryunosuke\dbml\Gateway\TableGateway::update ($data, $identifier = []) : intstringarrayryunosuke\dbml\Query\Statement

駆動表を省略できる ryunosuke\dbml\Database::update()

method ryunosuke\dbml\Gateway\TableGateway::delete ($identifier = []) : intstringarrayryunosuke\dbml\Query\Statement

駆動表を省略できる ryunosuke\dbml\Database::delete()

method ryunosuke\dbml\Gateway\TableGateway::remove ($identifier = []) : intstringarrayryunosuke\dbml\Query\Statement

駆動表を省略できる ryunosuke\dbml\Database::remove()

method ryunosuke\dbml\Gateway\TableGateway::destroy ($identifier = []) : intstring[]

駆動表を省略できる ryunosuke\dbml\Database::destroy()

method ryunosuke\dbml\Gateway\TableGateway::reduce ($limit = null, $orderBy = [], $groupBy = [], $identifier = []) : intstring

駆動表を省略できる ryunosuke\dbml\Database::reduce()

method ryunosuke\dbml\Gateway\TableGateway::upsert ($insertData, $updateData = []) : intarray

駆動表を省略できる ryunosuke\dbml\Database::upsert()

method ryunosuke\dbml\Gateway\TableGateway::modify ($insertData, $updateData = []) : intarrayryunosuke\dbml\Query\Statement

駆動表を省略できる ryunosuke\dbml\Database::modify()

method ryunosuke\dbml\Gateway\TableGateway::replace ($insertData) : intarrayryunosuke\dbml\Query\Statement

駆動表を省略できる ryunosuke\dbml\Database::replace()

method ryunosuke\dbml\Gateway\TableGateway::truncate ($cascade = false) : int

駆動表を省略できる ryunosuke\dbml\Database::truncate()

method ryunosuke\dbml\Gateway\TableGateway::getLastInsertId ($columnname = null) : nullstring

最後に挿入した ID を返す

Gateway 版の ryunosuke\dbml\Database::getLastInsertId()

method ryunosuke\dbml\Gateway\TableGateway::resetAutoIncrement ($seq = 1) : void

自動採番列をリセットする

Gateway 版の ryunosuke\dbml\Database::resetAutoIncrement()

method ryunosuke\dbml\Gateway::getDefaultIteration () : string

デフォルトイテレーションモードを返す

method ryunosuke\dbml\Gateway::setDefaultIteration ($iterationMode) : ryunosuke\dbml\Gateway\TableGateway

デフォルトイテレーションモードを設定する

デフォルトのデフォルトは "array" なので、何も考えずに foreach で回すと array 相当の動作になる。

method ryunosuke\dbml\Gateway::getDefaultJoinMethod () : string

デフォルト JOIN モードを返す

method ryunosuke\dbml\Gateway::setDefaultJoinMethod ($string) : ryunosuke\dbml\Gateway\TableGateway

デフォルト JOIN モードを設定する

デフォルトのデフォルトは "AUTO" なので、何も考えずに JOIN すると最も良い感じに JOIN される。

method ryunosuke\dbml\Gateway::array ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityable[]

レコード群を配列で返す(ryunosuke\dbml\Database::selectArray() を参照)

method ryunosuke\dbml\Gateway::assoc ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityable[]

レコード群を連想配列で返す(ryunosuke\dbml\Database::selectAssoc() を参照)

method ryunosuke\dbml\Gateway::lists ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : array

レコード群を[value]で返す(ryunosuke\dbml\Database::selectLists() を参照)

method ryunosuke\dbml\Gateway::pairs ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : array

レコード群を[key => value]で返す(ryunosuke\dbml\Database::selectPairs() を参照)

method ryunosuke\dbml\Gateway::tuple ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityablefalse

レコードを配列で返す(ryunosuke\dbml\Database::selectTuple() を参照)

method ryunosuke\dbml\Gateway::value ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : mixed

カラム値をスカラーで返す(ryunosuke\dbml\Database::selectValue() を参照)

method ryunosuke\dbml\Gateway::find ($variadic_primary, $tableDescriptor = []) : arrayryunosuke\dbml\Entity\Entityablefalse

主キー指定でレコードを取得する

引数がかなりややこしいことになっている。複合主キーが id1, id2, id3 というテーブルだとすると

この仕様は「主キーを配列で持っている」「主キーを個別に持っている」という2つの状況に簡単に対応するため。
前者の状況はほとんど無いため、実質的な呼び出し方は (10, 20, 30) 方式で十分。

# レコードを1行取得する(単一主キーで全カラムを取得する最もシンプルな例)
$row = $gw->find(1);
// SELECT * FROM t_table WHERE primary_id = 1

# レコードを1行取得する(複合主キーでカラムを指定して取得するシンプルでない例)
$row = $gw->find([1, 2], ['column1', 'column2']);
// SELECT column1, column2 FROM t_table WHERE (primary_id1 = 1) AND (primary_id2 = 2)

method ryunosuke\dbml\Gateway::arrayInShare ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityable[]

array() の共有ロック版

method ryunosuke\dbml\Gateway::assocInShare ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityable[]

assoc() の共有ロック版

method ryunosuke\dbml\Gateway::listsInShare ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : array

lists() の共有ロック版

method ryunosuke\dbml\Gateway::pairsInShare ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : array

pairs() の共有ロック版

method ryunosuke\dbml\Gateway::tupleInShare ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityablefalse

tuple() の共有ロック版

method ryunosuke\dbml\Gateway::valueInShare ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : mixed

value() の共有ロック版

method ryunosuke\dbml\Gateway::findInShare ($variadic_primary, $tableDescriptor = []) : arrayryunosuke\dbml\Entity\Entityablefalse

find() の共有ロック版

method ryunosuke\dbml\Gateway::arrayForUpdate ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityable[]

array() の排他ロック版

method ryunosuke\dbml\Gateway::assocForUpdate ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityable[]

assoc() の排他ロック版

method ryunosuke\dbml\Gateway::listsForUpdate ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : array

lists() の排他ロック版

method ryunosuke\dbml\Gateway::pairsForUpdate ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : array

pairs() の排他ロック版

method ryunosuke\dbml\Gateway::tupleForUpdate ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityablefalse

tuple() の排他ロック版

method ryunosuke\dbml\Gateway::valueForUpdate ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : mixed

value() の排他ロック版

method ryunosuke\dbml\Gateway::findForUpdate ($variadic_primary, $tableDescriptor = []) : arrayryunosuke\dbml\Entity\Entityablefalse

find() の排他ロック版

method ryunosuke\dbml\Gateway::arrayOrThrow ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityable[]

array() の例外送出版

method ryunosuke\dbml\Gateway::assocOrThrow ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityable[]

assoc() の例外送出版

method ryunosuke\dbml\Gateway::listsOrThrow ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : array

lists() の例外送出版

method ryunosuke\dbml\Gateway::pairsOrThrow ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : array

pairs() の例外送出版

method ryunosuke\dbml\Gateway::tupleOrThrow ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityable

tuple() の例外送出版

method ryunosuke\dbml\Gateway::valueOrThrow ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : mixed

value() の例外送出版

method ryunosuke\dbml\Gateway::findOrThrow ($variadic_primary, $tableDescriptor = []) : arrayryunosuke\dbml\Entity\Entityable

find() の例外送出版

method ryunosuke\dbml\Gateway::yieldArray ($tableDescriptor = [], $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : ryunosuke\dbml\Generator\Yielder

レコード群を配列で少しずつ返す(ryunosuke\dbml\Database::yieldArray() を参照)

method ryunosuke\dbml\Gateway::yieldAssoc ($tableDescriptor = [], $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : ryunosuke\dbml\Generator\Yielder

レコード群を連想配列で少しずつ返す(ryunosuke\dbml\Database::yieldAssoc() を参照)

method ryunosuke\dbml\Gateway::yieldLists ($tableDescriptor = [], $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : ryunosuke\dbml\Generator\Yielder

レコード群を[value]で少しずつ返す(ryunosuke\dbml\Database::yieldLists() を参照)

method ryunosuke\dbml\Gateway::yieldPairs ($tableDescriptor = [], $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : ryunosuke\dbml\Generator\Yielder

レコード群を[key => value]で少しずつ返す(ryunosuke\dbml\Database::yieldPairs() を参照)

method ryunosuke\dbml\Gateway::subselectArray ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : ryunosuke\dbml\Query\QueryBuilder

指定して子供レコード(array)を表すサブビルダを返す(ryunosuke\dbml\Database::subselect() を参照)

method ryunosuke\dbml\Gateway::subselectAssoc ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : ryunosuke\dbml\Query\QueryBuilder

指定して子供レコード(assoc)を表すサブビルダを返す(ryunosuke\dbml\Database::subselect() を参照)

method ryunosuke\dbml\Gateway::subselectLists ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : ryunosuke\dbml\Query\QueryBuilder

指定して子供レコード(lists)を表すサブビルダを返す(ryunosuke\dbml\Database::subselect() を参照)

method ryunosuke\dbml\Gateway::subselectPairs ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : ryunosuke\dbml\Query\QueryBuilder

指定して子供レコード(pairs)を表すサブビルダを返す(ryunosuke\dbml\Database::subselect() を参照)

method ryunosuke\dbml\Gateway::subselectTuple ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : ryunosuke\dbml\Query\QueryBuilder

指定して子供レコード(tuple)を表すサブビルダを返す(ryunosuke\dbml\Database::subselect() を参照)

method ryunosuke\dbml\Gateway::subselectValue ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : ryunosuke\dbml\Query\QueryBuilder

指定して子供レコード(value)を表すサブビルダを返す(ryunosuke\dbml\Database::subselect() を参照)

method ryunosuke\dbml\Gateway::select ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : ryunosuke\dbml\Query\QueryBuilder

駆動表を省略できる ryunosuke\dbml\Database::select()

method ryunosuke\dbml\Gateway::subquery ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : ryunosuke\dbml\Query\QueryBuilder

駆動表を省略できる ryunosuke\dbml\Database::subquery()

method ryunosuke\dbml\Gateway::subexists ($tableDescriptor, $where = []) : ryunosuke\dbml\Query\QueryBuilder

駆動表を省略できる ryunosuke\dbml\Database::subexists()

method ryunosuke\dbml\Gateway::notSubexists ($tableDescriptor, $where = []) : ryunosuke\dbml\Query\QueryBuilder

駆動表を省略できる ryunosuke\dbml\Database::notSubexists()

method ryunosuke\dbml\Gateway::subcount ($column, $where = []) : ryunosuke\dbml\Query\QueryBuilder

駆動表を省略できる ryunosuke\dbml\Database::subcount()

method ryunosuke\dbml\Gateway::submin ($column, $where = []) : ryunosuke\dbml\Query\QueryBuilder

駆動表を省略できる ryunosuke\dbml\Database::submin()

method ryunosuke\dbml\Gateway::submax ($column, $where = []) : ryunosuke\dbml\Query\QueryBuilder

駆動表を省略できる ryunosuke\dbml\Database::submax()

method ryunosuke\dbml\Gateway::subsum ($column, $where = []) : ryunosuke\dbml\Query\QueryBuilder

駆動表を省略できる ryunosuke\dbml\Database::subsum()

method ryunosuke\dbml\Gateway::subavg ($column, $where = []) : ryunosuke\dbml\Query\QueryBuilder

駆動表を省略できる ryunosuke\dbml\Database::subavg()

method ryunosuke\dbml\Gateway::neighbor ($predicates, $limit = 1) : arrayryunosuke\dbml\Entity\Entityable[]

前後のレコードを返す(ryunosuke\dbml\Query\QueryBuilder::neighbor() を参照)

method ryunosuke\dbml\Gateway::exists ($where = [], $for_update = false) : intfloat

駆動表を省略できる ryunosuke\dbml\Database::exists()

method ryunosuke\dbml\Gateway::selectExists ($where = [], $for_update = false) : ryunosuke\dbml\Query\QueryBuilder

駆動表を省略できる ryunosuke\dbml\Database::selectExists()

method ryunosuke\dbml\Gateway::selectNotExists ($where = [], $for_update = false) : ryunosuke\dbml\Query\QueryBuilder

駆動表を省略できる ryunosuke\dbml\Database::selectNotExists()

method ryunosuke\dbml\Gateway::selectCount ($column, $where = [], $groupBy = [], $having = []) : ryunosuke\dbml\Query\QueryBuilder

駆動表を省略できる ryunosuke\dbml\Database::selectCount()

method ryunosuke\dbml\Gateway::selectMin ($column, $where = [], $groupBy = [], $having = []) : ryunosuke\dbml\Query\QueryBuilder

駆動表を省略できる ryunosuke\dbml\Database::selectMin()

method ryunosuke\dbml\Gateway::selectMax ($column, $where = [], $groupBy = [], $having = []) : ryunosuke\dbml\Query\QueryBuilder

駆動表を省略できる ryunosuke\dbml\Database::selectMax()

method ryunosuke\dbml\Gateway::selectSum ($column, $where = [], $groupBy = [], $having = []) : ryunosuke\dbml\Query\QueryBuilder

駆動表を省略できる ryunosuke\dbml\Database::selectSum()

method ryunosuke\dbml\Gateway::selectAvg ($column, $where = [], $groupBy = [], $having = []) : ryunosuke\dbml\Query\QueryBuilder

駆動表を省略できる ryunosuke\dbml\Database::selectAvg()

method ryunosuke\dbml\Gateway::insertSelect ($sql, $columns = [], $params = []) : array

駆動表を省略できる ryunosuke\dbml\Database::insertSelect()

method ryunosuke\dbml\Gateway::insertArray ($data, $chunk = 0) : array

駆動表を省略できる ryunosuke\dbml\Database::insertArray()

method ryunosuke\dbml\Gateway::updateArray ($data, $identifier = []) : array

駆動表を省略できる ryunosuke\dbml\Database::updateArray()

method ryunosuke\dbml\Gateway::modifyArray ($insertData, $updateData = [], $chunk = 0) : array

駆動表を省略できる ryunosuke\dbml\Database::modifyArray()

method ryunosuke\dbml\Gateway::changeArray ($dataarray, $identifier) : array

駆動表を省略できる ryunosuke\dbml\Database::changeArray()

method ryunosuke\dbml\Gateway::insertOrThrow ($data) : array

insert() の例外送出版

method ryunosuke\dbml\Gateway::updateOrThrow ($data, $identifier = []) : array

update() の例外送出版

method ryunosuke\dbml\Gateway::deleteOrThrow ($identifier = []) : array

delete() の例外送出版

method ryunosuke\dbml\Gateway::removeOrThrow ($identifier = []) : array

remove() の例外送出版

method ryunosuke\dbml\Gateway::destroyOrThrow ($identifier = []) : array

destroy() の例外送出版

method ryunosuke\dbml\Gateway::reduceOrThrow ($limit = null, $orderBy = [], $groupBy = [], $identifier = []) : array

reduce() の例外送出版

method ryunosuke\dbml\Gateway::upsertOrThrow ($insertData, $updateData = []) : array

upsert() の例外送出版

method ryunosuke\dbml\Gateway::modifyOrThrow ($insertData, $updateData = []) : array

modify() の例外送出版

method ryunosuke\dbml\Gateway::replaceOrThrow ($data) : array

replace() の例外送出版

method ryunosuke\dbml\Gateway::insertIgnore ($data) : array

駆動表を省略できる ryunosuke\dbml\Database::insertIgnore()

method ryunosuke\dbml\Gateway::updateIgnore ($data, $identifier = []) : array

駆動表を省略できる ryunosuke\dbml\Database::updateIgnore()

method ryunosuke\dbml\Gateway::deleteIgnore ($identifier = []) : array

駆動表を省略できる ryunosuke\dbml\Database::deleteIgnore()

method ryunosuke\dbml\Gateway::removeIgnore ($identifier = []) : array

駆動表を省略できる ryunosuke\dbml\Database::removeIgnore()

method ryunosuke\dbml\Gateway::destroyIgnore ($identifier = []) : array

駆動表を省略できる ryunosuke\dbml\Database::destroyIgnore()

method ryunosuke\dbml\Gateway::modifyIgnore ($insertData, $updateData = []) : array

駆動表を省略できる ryunosuke\dbml\Database::modifyIgnore()

method ryunosuke\dbml\Gateway::insertConditionally ($condition, $data) : array

駆動表を省略できる ryunosuke\dbml\Database::insertConditionally()

method ryunosuke\dbml\Gateway::upsertConditionally ($condition, $insertData, $updateData = []) : array

駆動表を省略できる ryunosuke\dbml\Database::upsertConditionally()

method ryunosuke\dbml\Gateway::modifyConditionally ($condition, $insertData, $updateData = []) : array

駆動表を省略できる ryunosuke\dbml\Database::modifyConditionally()

method ryunosuke\dbml\Gateway::prepareSelect ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : ryunosuke\dbml\Query\Statement

駆動表を省略できる ryunosuke\dbml\Database::prepareSelect()

method ryunosuke\dbml\Gateway::prepareInsert ($data) : ryunosuke\dbml\Query\Statement

駆動表を省略できる ryunosuke\dbml\Database::prepareInsert()

method ryunosuke\dbml\Gateway::prepareUpdate ($data, $identifier = []) : ryunosuke\dbml\Query\Statement

駆動表を省略できる ryunosuke\dbml\Database::prepareUpdate()

method ryunosuke\dbml\Gateway::prepareDelete ($identifier = []) : ryunosuke\dbml\Query\Statement

駆動表を省略できる ryunosuke\dbml\Database::prepareDelete()

method ryunosuke\dbml\Gateway::prepareModify ($insertData, $updateData = []) : ryunosuke\dbml\Query\Statement

駆動表を省略できる ryunosuke\dbml\Database::prepareModify()

method ryunosuke\dbml\Gateway::prepareReplace ($data) : ryunosuke\dbml\Query\Statement

駆動表を省略できる ryunosuke\dbml\Database::prepareReplace()

namespace ryunosuke\dbml\Generator

class ryunosuke\dbml\Generator::Yielder

少しずつ fetch する Generator のようなクラス

method ryunosuke\dbml\Generator\Yielder::__construct ($statement, $connection, $method = null, $callback = null) : void

コンストラクタ

method ryunosuke\dbml\Generator\Yielder::__destruct () : void

デストラクタ

設定を戻したりカーソルを閉じたりする。

method ryunosuke\dbml\Generator\Yielder::setFetchMethod ($method) : ryunosuke\dbml\Generator\Yielder

フェッチメソッドを設定する

Database の METHOD_XXX 定数を参照。

method ryunosuke\dbml\Generator\Yielder::setBufferMode ($mode) : ryunosuke\dbml\Generator\Yielder

mysql におけるバッファモード/非バッファモードを切り替える

このメソッドを true で呼び出すと「同時にクエリを実行できない代わりに省メモリモード」で動作する。
詳細は 公式マニュアルを参照。

foreach ($db->yieldAssoc($sql)->setBufferMode(false) as $key => $row) {
    // このループは非バッファモードで動作する(このブロック内で別のクエリを投げることは出来ない)
    var_dump($row);
}

「同時にクエリを実行できない」は Database::sub 系クエリが使えないことを意味するので、本当に必要な時以外は呼ばなくていい。

method ryunosuke\dbml\Generator\Yielder::setEmulationUnique ($mode) : ryunosuke\dbml\Generator\Yielder

FETCH_UNIQUE の動作を模倣するか設定

このクラスは foreach で回せるが、逐次取得なので FETCH_UNIQUE 相当の動作(キーを最初のカラムにする)ができない。
(ループ処理そのものなので重複処理が行えない)。
このメソッドを true で呼び出すとアプリレイヤーでなんとかしてその動作を模倣するようになる。

要するに「キーが連番になるか最初のカラム値になるか」を指定する。

foreach ($db->yieldAssoc($sql)->setEmulationUnique(true) as $key => $row) {
    // $key が「レコードの最初のカラム値」を表すようになる
    var_dump($key);
}

とはいえデフォルトで true なので明示的に呼ぶ必要はほとんど無い。
上記のコードを false にすると挙動が分かりやすい。

class ryunosuke\dbml\Generator::AbstractGenerator

行ごとに何らかの変換を通して返す抽象クラス

classconstant string ryunosuke\dbml\Generator\AbstractGenerator::BOM

property array ryunosuke\dbml\Generator\AbstractGenerator::config

method ryunosuke\dbml\Generator\AbstractGenerator::__construct ($config = []) : void

method ryunosuke\dbml\Generator\AbstractGenerator::generate ($location, $provider) : int

出力場所とデータプロバイダを与えて出力する

method ryunosuke\dbml\Generator\AbstractGenerator::initProvider ($provider) : void

プロバイダの初期設定を行う

method ryunosuke\dbml\Generator\AbstractGenerator::generateHead ($resource) : void

head を出力する

例えば csv ならヘッダ行、 json なら [{ などの開きブレースを出力する。

method ryunosuke\dbml\Generator\AbstractGenerator::generateBody ($resource, $key, $value, $first_flg) : void

body を出力する

例えば csv なら "a,b,c"、 json なら "{a: 1, b: 2, c: 3}" のようなデータ本体を出力する。

method ryunosuke\dbml\Generator\AbstractGenerator::generateTail ($resource) : void

tail を出力する

json なら ]} などの閉じブレースを出力する。

class ryunosuke\dbml\Generator::ArrayGenerator

行ごとに php 配列化する出力クラス

classconstant string ryunosuke\dbml\Generator\ArrayGenerator::BOM

property array ryunosuke\dbml\Generator\ArrayGenerator::config

method ryunosuke\dbml\Generator\ArrayGenerator::__construct ($config = []) : void

method ryunosuke\dbml\Generator\ArrayGenerator::initProvider ($provider) : void

プロバイダの初期設定を行う

method ryunosuke\dbml\Generator\ArrayGenerator::generateHead ($resource) : void

head を出力する

例えば csv ならヘッダ行、 json なら [{ などの開きブレースを出力する。

method ryunosuke\dbml\Generator\ArrayGenerator::generateBody ($resource, $key, $value, $first_flg) : void

body を出力する

例えば csv なら "a,b,c"、 json なら "{a: 1, b: 2, c: 3}" のようなデータ本体を出力する。

method ryunosuke\dbml\Generator\ArrayGenerator::generateTail ($resource) : void

tail を出力する

json なら ]} などの閉じブレースを出力する。

method ryunosuke\dbml\Generator\ArrayGenerator::generate ($location, $provider) : int

出力場所とデータプロバイダを与えて出力する

class ryunosuke\dbml\Generator::CsvGenerator

行ごとに CSV 化する出力クラス

classconstant string ryunosuke\dbml\Generator\CsvGenerator::BOM

property array ryunosuke\dbml\Generator\CsvGenerator::config

method ryunosuke\dbml\Generator\CsvGenerator::__construct ($config = []) : void

method ryunosuke\dbml\Generator\CsvGenerator::initProvider ($provider) : void

プロバイダの初期設定を行う

method ryunosuke\dbml\Generator\CsvGenerator::generateHead ($resource) : void

head を出力する

例えば csv ならヘッダ行、 json なら [{ などの開きブレースを出力する。

method ryunosuke\dbml\Generator\CsvGenerator::generateBody ($resource, $key, $value, $first_flg) : void

body を出力する

例えば csv なら "a,b,c"、 json なら "{a: 1, b: 2, c: 3}" のようなデータ本体を出力する。

method ryunosuke\dbml\Generator\CsvGenerator::generateTail ($resource) : void

tail を出力する

json なら ]} などの閉じブレースを出力する。

method ryunosuke\dbml\Generator\CsvGenerator::generate ($location, $provider) : int

出力場所とデータプロバイダを与えて出力する

class ryunosuke\dbml\Generator::JsonGenerator

行ごとに JSON 化する出力クラス

classconstant string ryunosuke\dbml\Generator\JsonGenerator::BOM

property array ryunosuke\dbml\Generator\JsonGenerator::config

method ryunosuke\dbml\Generator\JsonGenerator::__construct ($config = []) : void

method ryunosuke\dbml\Generator\JsonGenerator::initProvider ($provider) : void

プロバイダの初期設定を行う

method ryunosuke\dbml\Generator\JsonGenerator::generateHead ($resource) : void

head を出力する

例えば csv ならヘッダ行、 json なら [{ などの開きブレースを出力する。

method ryunosuke\dbml\Generator\JsonGenerator::generateBody ($resource, $key, $value, $first_flg) : void

body を出力する

例えば csv なら "a,b,c"、 json なら "{a: 1, b: 2, c: 3}" のようなデータ本体を出力する。

method ryunosuke\dbml\Generator\JsonGenerator::generateTail ($resource) : void

tail を出力する

json なら ]} などの閉じブレースを出力する。

method ryunosuke\dbml\Generator\JsonGenerator::generate ($location, $provider) : int

出力場所とデータプロバイダを与えて出力する

namespace ryunosuke\dbml\Metadata

class ryunosuke\dbml\Metadata::CompatiblePlatform

各 Platform では賄いきれない RDBMS の差異を吸収するクラス

ライブラリ内部で $platform instanceof したくないのでそういうのはこのクラスが吸収する。
あと sqlite だけでできるだけカバレッジを埋めたい裏事情もある。
(コイツのテストは接続を必要としないのであらゆる環境でカバーできるため)。

本当は AbstractPlatform を継承したいんだけどそれだと本家の変更を自動追従できないのでコンポジットパターンになっている。

method ryunosuke\dbml\Metadata\CompatiblePlatform::__construct ($platform) : void

コンストラクタ

method ryunosuke\dbml\Metadata\CompatiblePlatform::getWrappedPlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

元 platform を取得する

method ryunosuke\dbml\Metadata\CompatiblePlatform::supportsIdentityUpdate () : bool

AUTO_INCREMENT な列を明示指定して UPDATE できるか否かを返す

method ryunosuke\dbml\Metadata\CompatiblePlatform::supportsInsertSet () : bool

INSERT SET 拡張構文が使えるか否かを返す

method ryunosuke\dbml\Metadata\CompatiblePlatform::supportsReplace () : bool

REPLACE が使えるか否かを返す

method ryunosuke\dbml\Metadata\CompatiblePlatform::supportsMerge () : bool

MERGE が使えるか否かを返す

method ryunosuke\dbml\Metadata\CompatiblePlatform::supportsIgnore () : bool

IGNORE が使えるか否かを返す

method ryunosuke\dbml\Metadata\CompatiblePlatform::supportsZeroAffectedUpdate () : bool

UPDATE で更新されなかった時(条件一致しなかった時ではなく更新行に変化がなかった時) 0 を返すか否かを返す

PDO::MYSQL_ATTR_FOUND_ROWS にも依存するけどここでは見ない(ほぼテスト用なので)

method ryunosuke\dbml\Metadata\CompatiblePlatform::supportsUpdateJoin () : bool

UPDATE + JOIN をサポートするか否かを返す

method ryunosuke\dbml\Metadata\CompatiblePlatform::supportsDeleteJoin () : bool

DELETE + JOIN をサポートするか否かを返す

method ryunosuke\dbml\Metadata\CompatiblePlatform::supportsUpdateLimit () : bool

UPDATE + ORDER BY,LIMIT をサポートするか否かを返す

method ryunosuke\dbml\Metadata\CompatiblePlatform::supportsDeleteLimit () : bool

DELETE + ORDER BY,LIMIT をサポートするか否かを返す

method ryunosuke\dbml\Metadata\CompatiblePlatform::supportsUnionParentheses () : bool

UNION が括弧をサポートするか否かを返す

method ryunosuke\dbml\Metadata\CompatiblePlatform::supportsResetAutoIncrementOnTruncate () : bool

TRUNCATE 文で自動採番列がリセットされるか否かを返す

method ryunosuke\dbml\Metadata\CompatiblePlatform::supportsTableNameAttribute () : bool

\PDO::ATTR_FETCH_TABLE_NAMES が有効か否かを返す

method ryunosuke\dbml\Metadata\CompatiblePlatform::supportsRowConstructor () : bool

行値式が有効か否かを返す

method ryunosuke\dbml\Metadata\CompatiblePlatform::quoteIdentifierIfNeeded ($word) : string

必要に応じて識別子をエスケープする

method ryunosuke\dbml\Metadata\CompatiblePlatform::escapeLike ($word, $escaper = "\\") : string

LIKE エスケープする

method ryunosuke\dbml\Metadata\CompatiblePlatform::getDualTable () : string

(対応しているなら) dual 表を返す

method ryunosuke\dbml\Metadata\CompatiblePlatform::getFoundRowsOption () : ryunosuke\dbml\Query\Expression\SelectOption

CALC_FOUND_ROWS が使える場合にその SelectOption を返す

method ryunosuke\dbml\Metadata\CompatiblePlatform::getFoundRowsQuery () : string

CALC_FOUND_ROWS が使える場合にその関数名を返す

method ryunosuke\dbml\Metadata\CompatiblePlatform::getMergeSQL ($updateData, $constraint = null) : stringbool

MERGE 構文を返す

method ryunosuke\dbml\Metadata\CompatiblePlatform::getIdentityInsertSQL ($tableName, $onoffflag) : string

自動採番を使うか切り替えるための SQL を返す

method ryunosuke\dbml\Metadata\CompatiblePlatform::getTruncateTableSQL ($tableName, $cascade = false) : string

TRUNCATE 文を返す

method ryunosuke\dbml\Metadata\CompatiblePlatform::getIdentitySequenceName ($tableName, $columnName) : stringnull

ID シーケンス名を返す

method ryunosuke\dbml\Metadata\CompatiblePlatform::getIndexHintSQL ($index_name, $mode = "FORCE") : string

インデックスヒント構文を返す

method ryunosuke\dbml\Metadata\CompatiblePlatform::appendLockSuffix ($query, $lockmode, $lockoption) : string

クエリにロック構文を付加して返す

method ryunosuke\dbml\Metadata\CompatiblePlatform::getPrimaryCondition ($wheres, $prefix = "") : ryunosuke\dbml\Query\Expression\Expression

条件配列を結合した Expression を返す

method ryunosuke\dbml\Metadata\CompatiblePlatform::getCaseWhenSyntax ($expr, $whens, $else = null) : ryunosuke\dbml\Query\Expression\Expression

CASE ~ END 構文

method ryunosuke\dbml\Metadata\CompatiblePlatform::getGroupConcatSyntax ($expr, $separator = null, $order = null) : string

GROUP_CONCAT 構文を返す

method ryunosuke\dbml\Metadata\CompatiblePlatform::getSpaceshipSyntax ($column) : string

null 許容演算子(<=>)構文を返す

$column はカラム名を想定しており、エスケープされないので注意すること。

method ryunosuke\dbml\Metadata\CompatiblePlatform::getCountExpression ($column) : ryunosuke\dbml\Query\Expression\Expression

count 表現を返す

method ryunosuke\dbml\Metadata\CompatiblePlatform::getMinExpression ($column) : ryunosuke\dbml\Query\Expression\Expression

min 表現を返す

method ryunosuke\dbml\Metadata\CompatiblePlatform::getMaxExpression ($column) : ryunosuke\dbml\Query\Expression\Expression

max 表現を返す

method ryunosuke\dbml\Metadata\CompatiblePlatform::getSumExpression ($column) : ryunosuke\dbml\Query\Expression\Expression

sum 表現を返す

method ryunosuke\dbml\Metadata\CompatiblePlatform::getAvgExpression ($column) : ryunosuke\dbml\Query\Expression\Expression

avg 表現を返す

method ryunosuke\dbml\Metadata\CompatiblePlatform::getConcatExpression ($args) : ryunosuke\dbml\Query\Expression\Expression

文字列結合句を返す

method ryunosuke\dbml\Metadata\CompatiblePlatform::getResetSequenceExpression ($tableName, $columnName, $seq) : array

AUTO_INCREMENT のセット構文を返す

method ryunosuke\dbml\Metadata\CompatiblePlatform::getIgnoreSyntax () : string

IGNORE 構文を返す

method ryunosuke\dbml\Metadata\CompatiblePlatform::commentize ($comment, $cstyle = false) : string

与えられた文をコメント化する

method ryunosuke\dbml\Metadata\CompatiblePlatform::convertMergeData ($insertData, $updateData) : array

挿入データと更新データで更新用カラム列を生成する

mysql の VALUES 構文のために存在している

method ryunosuke\dbml\Metadata\CompatiblePlatform::convertSelectExistsQuery ($exists) : ryunosuke\dbml\Query\Expression\Expression

EXISTS 構文を SELECT で使用できるようにする

method ryunosuke\dbml\Metadata\CompatiblePlatform::isRetryableException ($ex) : bool

リトライ可能例外か判定する

method ryunosuke\dbml\Metadata\CompatiblePlatform::convertUpdateQuery ($builder) : string

SELECT 文を UPDATE 文に変換する

method ryunosuke\dbml\Metadata\CompatiblePlatform::convertDeleteQuery ($builder, $targets) : string

SELECT 文を DELETE 文に変換する

class ryunosuke\dbml\Metadata::Schema

スキーマ情報の収集と保持とキャッシュを行うクラス

キャッシュ

カラム情報や主キー情報の取得のためにスキーマ情報を結構な勢いで漁る。
しかし、基本的にはスキーマ情報は自動でキャッシュするので意識はしなくて OK。

VIEW

VIEW は TABLE と同等の存在として扱う。つまり getTableNames メソッドの返り値には VIEW も含まれる。
VIEW は 外部キーやインデックスこそ張れないが、 SELECT 系なら TABLE と同様の操作ができる。
更新可能 VIEW ならおそらく更新も可能である。

メタ情報

テーブルやカラムコメントには ini 形式でメタ情報を埋め込むことができる。
設定されているメタ情報は getTableColumnMetadata メソッドで取得することができる。
(ただし、現在のところこのメタ情報を活用している機能は非常に少なく、実質 anywhere のみ)。

CREATE TABLE t_table (
c_column INT COMMENT 'これはカラムコメントです
anywhere.keyonly = 1
anywhere.greedy = 0
;↑はカラムのメタ属性です'
)
COMMENT='これはテーブルコメントです
anywhere.keyonly = 1
anywhere.greedy = 0
;↑はテーブルのメタ属性です'

メタ情報は php の parse_ini_string で行われるが、ドット区切りで配列の階層を持つことができる。
つまり上記のメタ情報は

[
    'anywhere' => [
        'keyonly' => 1,
        'greedy'  => 0,
    ],
]

と解釈される。
メタ文字列は可能な限り ini としてパースしようとし、いかなる適当な文字列でも警告は出ない。

method ryunosuke\dbml\Metadata\Schema::__construct ($schemaManger, $cache) : void

コンストラクタ

method ryunosuke\dbml\Metadata\Schema::refresh () : void

一切のメタデータを削除する

method ryunosuke\dbml\Metadata\Schema::addTable ($table) : void

テーブルオブジェクトをメタデータに追加する

method ryunosuke\dbml\Metadata\Schema::setTableColumn ($table_name, $column_name, $definitation) : Doctrine\DBAL\Schema\Columnnull

テーブルのカラムを変更する

存在しないカラムも指定できる。
その場合、普通に追加されるので仮想カラムとして扱うことができる。

method ryunosuke\dbml\Metadata\Schema::hasTable ($table_name) : bool

テーブルが存在するなら true を返す

method ryunosuke\dbml\Metadata\Schema::getTableNames () : string[]

テーブル名一覧を取得する

method ryunosuke\dbml\Metadata\Schema::getTable ($table_name) : Doctrine\DBAL\Schema\Table

テーブルオブジェクトを取得する

method ryunosuke\dbml\Metadata\Schema::getTableColumns ($table_name) : Doctrine\DBAL\Schema\Column[]

テーブルのカラムオブジェクトを取得する

method ryunosuke\dbml\Metadata\Schema::getTableColumnMetadata ($table_name, $column_name = null) : array

テーブルのコメントからメタデータを取得する

method ryunosuke\dbml\Metadata\Schema::getTablePrimaryKey ($table_name) : Doctrine\DBAL\Schema\Index

テーブルの主キーインデックスオブジェクトを取得する

method ryunosuke\dbml\Metadata\Schema::getTablePrimaryColumns ($table_name) : Doctrine\DBAL\Schema\Column[]

テーブルの主キーカラムオブジェクトを取得する

method ryunosuke\dbml\Metadata\Schema::getTableAutoIncrement ($table_name) : Doctrine\DBAL\Schema\Column

テーブルのオートインクリメントカラムを取得する

method ryunosuke\dbml\Metadata\Schema::getTableForeignKeys ($table_name) : Doctrine\DBAL\Schema\ForeignKeyConstraint[]

テーブルの外部キーオブジェクトを取得する

method ryunosuke\dbml\Metadata\Schema::getForeignKeys ($to_table = null, $from_table = null) : Doctrine\DBAL\Schema\ForeignKeyConstraint[]

テーブル間外部キーオブジェクトを取得する

端的に言えば $from_table から $to_table へ向かう外部キーを取得する。ただし

を取得する。

method ryunosuke\dbml\Metadata\Schema::getForeignTable ($fkeyname) : array

外部キーから関連テーブルを取得する

method ryunosuke\dbml\Metadata\Schema::getForeignColumns ($table_name1, $table_name2, $fkeyname = null, &$direction = null) : array

テーブル間を結ぶ外部キーカラムを取得する

method ryunosuke\dbml\Metadata\Schema::addForeignKeyLazy ($localTable, $foreignTable, $columnsMap, $fkname = null) : string

テーブルに外部キーを追加する

このメソッドで追加された外部キーはできるだけ遅延して追加され、必要になるまでは実行されない。

method ryunosuke\dbml\Metadata\Schema::addForeignKey ($fkey) : Doctrine\DBAL\Schema\ForeignKeyConstraint

テーブルに外部キーを追加する

このメソッドで追加された外部キーはデータベースに反映されるわけでもないし、キャッシュにも乗らない。
あくまで「アプリ的にちょっとリレーションが欲しい」といったときに使用する想定。

method ryunosuke\dbml\Metadata\Schema::ignoreForeignKey ($fkey) : Doctrine\DBAL\Schema\ForeignKeyConstraint

テーブルの外部キーを削除する

このメソッドで削除された外部キーはデータベースに反映されるわけでもないし、キャッシュにも乗らない。
あくまで「アプリ的にちょっとリレーションを外したい」といったときに使用する想定。

method ryunosuke\dbml\Metadata\Schema::getRelation () : array

外部キーから [table => [columnA => [table => [column => FK]]]] な配列を生成する

外部キーがループしてると導出が困難なため、木構造ではなく単純なフラット配列にしてある。
(自身へアクセスすれば木構造的に辿ることは可能)。

method ryunosuke\dbml\Metadata\Schema::getIndirectlyColumns ($to_table, $from_table) : array

中間テーブルを介さずに結合できるカラムを返す

method ryunosuke\dbml\Metadata\Schema::followColumnName ($to_table, $from_table, $from_column) : array

外部キーを辿って「テーブルA.カラムX」から「テーブルB.カラムY」を導出

返り値のキーには辿ったパス(テーブル)が / 区切りで格納される。

namespace ryunosuke\dbml\Mixin

trait ryunosuke\dbml\Mixin::OptionTrait

オプションを保持し、get/set できるようにする trait

use する側は必ず getDefaultOptions を実装する。

このトレイトを使うと「その場限りの設定変更」が容易になる。
具体的には stack/unstackcontext を使用して一時的に設定を変更し、不要になったときに一気に戻す。
stack/unstackcontext の違いは「明示的に戻す必要があるか」である。以下に例を挙げる。

# 今だけは hoge:1 にしたい
$that->stack();
$that->setOption('hoge', 1);
$that->doSomething(); // この処理は hoge:1 になっている
$that->unstack(); // 終わったので元に戻す

# 今だけは hoge:2 にしたい
$cx = $that->context();
$cx->setOption('hoge', 2);
$cx->doSomething(); // この処理は hoge:2 になっている
unset($cx); // 終わったので元に戻す

# 今だけは hoge:3 にしたい
$that->context(['hoge' => 3])->doSomething(); // この処理は hoge:3 になっている
// 終わったので元に戻す…必要はない。 context 既に参照が切れており、 RAII により既に元に戻っている

stack/context の併用は出来ない(併用したときの動作は未定義)が、併用さえしなければどちらもネスト可能。
ただし、 context は自身を clone するのでループ内での使用は控えること。

method ryunosuke\dbml\Mixin\OptionTrait::getDefaultOptions () : array

オプションのデフォルト値を返す static メソッド

このメソッドの返り値が構成要素とデフォルト値を担っていて、その配列以外のキーは基本的に保持できない。

method ryunosuke\dbml\Mixin\OptionTrait::OptionTrait__callGetSet ($name, $arguments, &$called) : mixed

マジックメソッド __call 用メソッド

OptionTrait__callGetSet('getHoge') で getOption('hoge') が起動する。
OptionTrait__callGetSet('setHoge', $value) で setOption('hoge', $value) が起動する。

マッチしてコールされたら $called に true が格納される。

method ryunosuke\dbml\Mixin\OptionTrait::OptionTrait__callOption ($name, $arguments, &$called) : mixed

マジックメソッド __call 用メソッド

OptionTrait__callOption('hoge') で getOption('hoge') が起動する。
OptionTrait__callOption('hoge', $value) で setOption('hoge', $value) が起動する。

マッチしてコールされたら $called に true が格納される

method ryunosuke\dbml\Mixin\OptionTrait::OptionTrait__call ($name, $arguments) : mixed

マジックメソッド __call 用メソッド

OptionTrait__callGetSet と OptionTrait__callOption を呼び出し、マッチしなければ例外を投げる。

method ryunosuke\dbml\Mixin\OptionTrait::OptionTrait__destruct () : void

マジックメソッド __destruct 用メソッド

自身が context で生成されていたら unstack する。

method ryunosuke\dbml\Mixin\OptionTrait::__destruct () : void

デストラクタのデフォルト実装

デストラクタはコンストラクタに比べてそれほど実装されないので trait 側で定義してしまって良いと判断。
use 側でデストラクタを定義したい場合は OptionTrait__destruct を呼ぶようにすること。

method ryunosuke\dbml\Mixin\OptionTrait::setDefault ($overridden = []) : ryunosuke\dbml\Mixin\OptionTrait

デフォルト値を設定する

このメソッドでオプション項目が確定するので、これを呼ばないと何も出来ない。

method ryunosuke\dbml\Mixin\OptionTrait::getOriginal () : ryunosuke\dbml\Mixin\OptionTrait

大本のオブジェクトを返す

ryunosuke\dbml\Mixin\OptionTrait::context() している場合に、オリジナルの $this を返す。

method ryunosuke\dbml\Mixin\OptionTrait::context ($options = []) : ryunosuke\dbml\Mixin\OptionTrait

コンテキスト(一過性の自分自身)を生成して返す

このメソッドを呼ぶと「自身の設定と同一のインスタンス」が得られる。
そのインスタンスへの操作は自身・オリジナルに反映されるが、スコープを外れるとオリジナルの方は元に戻る。

// somthing が呼ばれる時点では hoge:1, fuga:2 となっている
$that->context(['hoge' => 1])->setOption('fuga', 2)->somthing();
// この時点で参照が切れているので hoge, fuga の値は元に戻っている
$that->somthing();

method ryunosuke\dbml\Mixin\OptionTrait::stack ($options = []) : ryunosuke\dbml\Mixin\OptionTrait

現オプションをスタックに積む

このメソッドを呼ぶと「現時点の設定」が保存される。
その後、いかなる変更を加えても unstack を呼べば保存された「現時点の設定」へ戻すことができる。
名前の通りスタック構造なので、保存はスタッカブルに行われる。

// somthing が呼ばれる時点では hoge:1, fuga:2 となっている
$that->stack(['hoge' => 1])->setOption('fuga', 2);
$that->somthing();
// この時点ではまだ hoge:1, fuga:2 のままなので下記のように明示的に戻す必要がある
$that->unstack();
// この時点で hoge, fuga の値は元に戻っている
$that->somthing();

method ryunosuke\dbml\Mixin\OptionTrait::unstack () : ryunosuke\dbml\Mixin\OptionTrait

ryunosuke\dbml\Mixin\OptionTrait::stack() で積んだオプションを復元する

method ryunosuke\dbml\Mixin\OptionTrait::unstackAll () : ryunosuke\dbml\Mixin\OptionTrait

戻せるまで ryunosuke\dbml\Mixin\OptionTrait::unstack() する

method ryunosuke\dbml\Mixin\OptionTrait::getOptions () : array

全オプション値を返却する

method ryunosuke\dbml\Mixin\OptionTrait::getOption ($name) : mixed

単一のオプション値を返却する

オプション名が存在しない場合、例外が飛ぶ。

method ryunosuke\dbml\Mixin\OptionTrait::getUnsafeOption ($name) : mixed

単一のオプション値を返却する(キーチェックなし)

オプション名が存在しない場合、例外は飛ばないが notice は出るかもしれない。

method ryunosuke\dbml\Mixin\OptionTrait::setOptions ($options) : ryunosuke\dbml\Mixin\OptionTrait

配列でオプション値を設定する

method ryunosuke\dbml\Mixin\OptionTrait::setOption ($name, $value) : ryunosuke\dbml\Mixin\OptionTrait

単一のオプション値を設定する

オプション名が存在しない場合、例外が飛ぶ。

method ryunosuke\dbml\Mixin\OptionTrait::setUnsafeOption ($name, $value) : ryunosuke\dbml\Mixin\OptionTrait

単一のオプション値を設定する(キーチェックなし)

オプション名が存在しない場合、例外は飛ばないし、 getDefaultOptions で規定されている項目外も設定可能。

method ryunosuke\dbml\Mixin\OptionTrait::storeOptions ($options) : \Closure

配列でオプション値を設定し、返り値として元の値に戻すクロージャを返す

// 設定を hoge:1 にする
$restore = $that->storeOptions(['hoge' => 1]);
// この時点では hoge:1 のまま
$that->something();
// $retore を呼ぶと設定が元に戻る
$retore();

method ryunosuke\dbml\Mixin\OptionTrait::mergeOption ($name, $value) : ryunosuke\dbml\Mixin\OptionTrait

配列のオプション値をマージする

method ryunosuke\dbml\Mixin\OptionTrait::mergeUnsafeOption ($name, $value) : ryunosuke\dbml\Mixin\OptionTrait

配列のオプション値をマージする(キーチェックなし)

method ryunosuke\dbml\Mixin\OptionTrait::existsOption ($name) : bool

オプションが存在するなら true を返す

method ryunosuke\dbml\Mixin\OptionTrait::option ($name, $value = null) : ryunosuke\dbml\Mixin\OptionTraitnull

引数が1つなら get、引数が2つなら set する

// getter として働く
$that->option('opt-name');
// setter として働く
$that->option('opt->name', 'opt-value');

trait ryunosuke\dbml\Mixin::IteratorTrait

イテレータ(主に結果セット)を利用しやすくするための trait

結果セットプロバイダを渡すと \Countable::count, \IteratorAggregate::getIterator においてその結果セットの値を返すようになる。

method ryunosuke\dbml\Mixin\IteratorTrait::setProvider ($caller) : ryunosuke\dbml\Mixin\IteratorTrait

結果セットプロバイダを登録する

クロージャを渡すと単純にそのクロージャがコールされる。
文字列を渡すとメソッド名でコールする。
要素が一つだけの配列を与えるとキーをメソッド名、値を引数としてコールする。

いずれにせよ、全てクロージャに変換され、そのクロージャの $this はこのトレイトを use しているインスタンス自身になる。

// クロージャが単純にコールされる
$that->setProvider(function () {return (array) $this;});
// $that->method() がコールされる
$that->setProvider('method');
// $that->method(1, 2, 3) がコールされる
$that->setProvider(['method'] => [1, 2, 3]);

method ryunosuke\dbml\Mixin\IteratorTrait::resetProvider () : ryunosuke\dbml\Mixin\IteratorTrait

結果セットプロバイダを解除する

method ryunosuke\dbml\Mixin\IteratorTrait::resetResult () : ryunosuke\dbml\Mixin\IteratorTrait

結果セットをクリアして無効化する

method ryunosuke\dbml\Mixin\IteratorTrait::getResult () : array

結果セットを取得する

結果はキャッシュされるため、複数回呼んでも問題ない。

method ryunosuke\dbml\Mixin\IteratorTrait::getIterator () : \ArrayIterator

結果セットのイテレータを返す

method ryunosuke\dbml\Mixin\IteratorTrait::count () : int

結果セットの件数を返す

namespace ryunosuke\dbml\Query

namespace ryunosuke\dbml\Query\Expression

class ryunosuke\dbml\Query\Expression::TableDescriptor

テーブル記法の実装クラス

テーブル記法の概念については dbml を参照。
なお、内部的に使用されるだけで能動的に new したり活用されたりするようなクラスではない。

下記に記法としての定義を記載する。組み合わせた場合の使用例は ryunosuke\dbml\Query\QueryBuilder::column() を参照。

'(joinsign)tablename(pkval)@scope:fkeyname[condition]+order-by#offset-limit AS Alias.col1, col2 AS C2'

要素必須説明
joinsign任意JOIN する場合に結合方法を表す記号を置く('*':CROSS, '+':INNER, '<':LEFT, '>':RIGHT, '~':AUTO, ',':FROM)
tablename必須取得するテーブル名を指定する
(pkval)任意主キーの値を指定する
@scope任意対応する Gateway がありかつ scope というスコープが定義されているならそのスコープを当てる(複数可)
:fkeyname任意JOIN に使用する外部キー名を指定する
[condition]任意絞り込み条件を yaml で指定する(where 記法)
{condition}任意絞り込み条件を yaml で指定する(カラム結合)
+order-by任意ORDER BY を指定する
#offset-limit任意LIMIT, OFFSET を指定する
AS Alias任意テーブルエイリアスを指定する
.col1, col2 AS C2任意取得するカラムを指定する

joinsign

テーブルのプレフィックスとして *+<>~, を付けて JOIN を表す。
他に特記事項はない。

tablename

テーブル名を表す。
他に特記事項はない。

(pkval)

"()" 内で主キーの値を指定する。WHERE IN 化される。
主キーはカンマ区切りで複数指定できる。また、 "()" をネストすることで行値式相当の動作になる。

※ 行値式は対応していない RDBMS やインデックスが使われない RDBMS が存在するため一律 AND OR で構築される

@scope

テーブルのサフィックスとして @ を付けてスコープを表す。
関連するゲートウェイクラスが存在しかつ指定されたスコープが定義されていなければならない。

@を連続することで複数のスコープを当てることができる。

@ だけを付けるとデフォルトスコープを表す(あくまでゲートウェイとは別概念なのでデフォルトスコープと言えど明示的に与えなければならない)。

@scope(1, 2) とすることでパラメータ付きスコープの引数になる。

:fkeyname

テーブルのサフィックスとして : を付けて外部キーを表す。
テーブル間外部キーが1つなら指定しなくても自動で使用される。
ただし、空文字を指定すると「外部キーを使用しない」を表す。

[condition]

テーブルのサフィックスとして yaml 記法で絞り込み条件を表す。
駆動表に設定されている場合はただの WHERE 条件として働く。
結合表に設定されている場合は ON 条件として働く。

{condition}

テーブルのサフィックスとして yaml 記法で絞り込み条件を表す。

+order-by

テーブルのサフィックスとして [+-]columnname で ORDER BY を表す。
"+" プレフィックスで昇順、 "-" プレフィックスで降順を表す。各指定の明確な区切りはない(≒[+-] のどちらかは必須)。

offset-limit

テーブルのサフィックスとして #M-N で取得件数を表す。 M は省略可能。
単純な LIMIT OFFSET ではない。言うなれば「範囲指定」のようなもので、例えば "#40-50" は LIMIT 10 OFFSET 40 を表す。
つまり、「40件目から50-1件目」を表す(M はそのまま OFFSET に、 N - M が LIMIT になる)。
さらに、-N を省略した場合は「LIMIT 1 OFFSET M」を意味する。つまり単純な1行を指すことになる。
さらにさらに、M を省略した場合は 0 が補填される。クエリ的には OFFSET が設定されないことになる。
さらにさらにさらにこの指定は駆動表にのみ設定される(JOIN の LIMIT はサブクエリになり効率的ではないし、そもそも利用頻度が少ない)。

AS Alias

テーブルにエイリアスをつける。
AS は省略して tablename T でも良い。

.col1, col2 AS C2

取得するカラムリストを表す。カラムは直近のテーブル(エイリアス)で修飾される。
カンマ区切りで複数指定可能。
各カラムに対して AS aliasname とすることでエイリアスを表す(AS は省略可能)。


+order-by と #offset-limit は下記のように非常に相性が良い。

(pkval), @scope, :fkeyname, [condition], +order-by, #offset-limit に順番の規則はないので任意に入れ替えることができる。
つまり、下記はすべて同じ意味となる(全組み合わせはとんでもない数になるので一部(:fkeyname, [condition] など)のみ列挙)。

ただし、 @scope(スコープ引数) と (pkval) の記法が重複しているため注意。
例えば @scope(1, 2) これは「引数つきスコープ」なのか「引数なしスコープの後に (pkval)が来ている」のか区別ができない。
見た目的な意味(あたかも関数コールのように見えて美しい)でも (pkval) はテーブル名の直後に置くのが望ましい。

また、 yaml の中にまでは言及しないため、 "#" や "@" 等がリテラル内にある場合は誤作動を引き起こす。
構文解析までするのは仰々しいため、仕方のない仕様として許容する。

なお、テーブル記法に決してユーザ入力を埋め込んではならない
(pkval) などは埋め込みたくなるが、テーブル記法は値のエスケープなどを一切行わないので致命的な脆弱性となりうる。

classconstant string[] ryunosuke\dbml\Query\Expression\TableDescriptor::META_CHARACTORS

テーブル記法を表すメタ文字

property mixed ryunosuke\dbml\Query\Expression::descriptor

property string ryunosuke\dbml\Query\Expression::joinsign

property string ryunosuke\dbml\Query\Expression::table

property string ryunosuke\dbml\Query\Expression::alias

property ryunosuke\dbml\Query\Expression\TableDescriptor[] ryunosuke\dbml\Query\Expression::jointable

property array ryunosuke\dbml\Query\Expression::scope

property array ryunosuke\dbml\Query\Expression::condition

property string ryunosuke\dbml\Query\Expression::fkeyname

property array ryunosuke\dbml\Query\Expression::order

property int ryunosuke\dbml\Query\Expression::offset

property int ryunosuke\dbml\Query\Expression::limit

property array ryunosuke\dbml\Query\Expression::column

property string ryunosuke\dbml\Query\Expression::key

property string ryunosuke\dbml\Query\Expression::remaining

property string ryunosuke\dbml\Query\Expression::jointype

property string ryunosuke\dbml\Query\Expression::accessor

property string ryunosuke\dbml\Query\Expression::fkeysuffix

method ryunosuke\dbml\Query\Expression\TableDescriptor::forge ($database, $descriptor, $columnIfString = ["*"]) : ryunosuke\dbml\Query\Expression\TableDescriptor[]

文字列や配列からインスタンスの配列を生成する

method ryunosuke\dbml\Query\Expression\TableDescriptor::__construct ($database, $descriptor, $cols) : void

コンストラクタ

method ryunosuke\dbml\Query\Expression\TableDescriptor::__get ($name) : void

class ryunosuke\dbml\Query\Expression::Alias

カラムエイリアスを表すクラス

new Alias('alias', 'actual') を select に与えると "actual AS alias" に展開される。

method ryunosuke\dbml\Query\Expression\Alias::__callStatic ($alias, $actuals) : ryunosuke\dbml\Query\Expression\Alias

インスタンスを返す

これらはそれぞれ等価になる。

method ryunosuke\dbml\Query\Expression\Alias::split ($string, $defaultAlias = null) : array

hoge as fuga を分割する

method ryunosuke\dbml\Query\Expression\Alias::forge ($alias, $actual, $modifier = null) : ryunosuke\dbml\Query\Expression\Aliasmixed

値を Alias 化して返す

変換できなそうならそのまま返す。

method ryunosuke\dbml\Query\Expression\Alias::__construct ($alias, $actual, $modifier = null, $placeholdable = false) : void

コンストラクタ

method ryunosuke\dbml\Query\Expression\Alias::__toString () : string

文字列表現を返す

method ryunosuke\dbml\Query\Expression\Alias::getAlias () : stringnull

エイリアス名を返す

method ryunosuke\dbml\Query\Expression\Alias::getActual () : string

実部名を返す

method ryunosuke\dbml\Query\Expression\Alias::getModifier () : string

修飾子を返す

method ryunosuke\dbml\Query\Expression\Alias::isPlaceholdable () : bool

自動で伏せるべきか

class ryunosuke\dbml\Query\Expression::Expression

生クエリを表すクラス

new Expression('NOW()') を select に与えると "NOW()" に展開される(エスケープやサブクエリ化などの余計なことを一切行わない)。

method ryunosuke\dbml\Query\Expression\Expression::forge ($expr) : ryunosuke\dbml\Query\Expression\Expressionmixed

値を Expression 化して返す

変換できなそうならそのまま返す。

# 素の文字列はそのまま文字列のまま返す
$expr = Expression::forge('hoge'); // string: hoge

# "NULL" という文字列は expression を返す
$expr = Expression::forge("NULL"); // Expression: "NULL"

# (が含まれているなら Expression を返す
$expr = Expression::forge("NOW()"); // Expression: "NOW()"

# 数値型なら Expression を返す
$expr = Expression::forge(123); // Expression: "123"
$expr = Expression::forge(1.2); // Expression: "1.2"

# 真偽値なら数値 Expression を返す
$expr = Expression::forge(true); // Expression: "1"
$expr = Expression::forge(false); // Expression: "0"

method ryunosuke\dbml\Query\Expression\Expression::__callStatic ($expr, $params) : ryunosuke\dbml\Query\Expression\Expression

インスタンスを返す

つまり

はそれぞれ等価になる。

method ryunosuke\dbml\Query\Expression\Expression::__construct ($expr, $params = []) : void

コンストラクタ

method ryunosuke\dbml\Query\Expression\Expression::__toString () : string

文字列表現を返す

method ryunosuke\dbml\Query\Expression\Expression::getParams () : array

パラメータを返す

method ryunosuke\dbml\Query\Expression\Expression::getQuery () : string

クエリ文字列を返す

method ryunosuke\dbml\Query\Expression\Expression::merge (&$params) : string

パラメータをマージして文字列表現を返す

クエリ文字列を返し、引数配列にパラメータが追加される

class ryunosuke\dbml\Query\Expression::SelectOption

SELECT オプションクラス

このクラスのインスタンスを select すると、カラムとして追加されるのではなく、 SELECT 句の冒頭にカンマ無しで展開される。
SELECT OPT1 OPT2 column1, column2 のような形を実現するためのクラス。

$db->select('tablename.columname')->addSelectOption(SelectOption::DISTINCT);
// SELECT DISTINCT columnname FROM tablename

classconstant string ryunosuke\dbml\Query\Expression\SelectOption::DISTINCT

classconstant string ryunosuke\dbml\Query\Expression\SelectOption::SQL_CACHE

classconstant string ryunosuke\dbml\Query\Expression\SelectOption::SQL_NO_CACHE

classconstant string ryunosuke\dbml\Query\Expression\SelectOption::SQL_CALC_FOUND_ROWS

classconstant string ryunosuke\dbml\Query\Expression\SelectOption::STRAIGHT_JOIN

method ryunosuke\dbml\Query\Expression\SelectOption::__callStatic ($expr, $arguments) : ryunosuke\dbml\Query\Expression\SelectOption

インスタンスを返す

これらはそれぞれ等価になる

method ryunosuke\dbml\Query\Expression\SelectOption::__construct ($expr) : void

コンストラクタ

valid な文字列かどうかのチェックは行わないので、 SelectOption::DISTINCT のような定数を与えてもよいし、固定文字列を与えても良い。

method ryunosuke\dbml\Query\Expression\SelectOption::__toString () : string

文字列表現を返す

method ryunosuke\dbml\Query\Expression::DISTINCT () : ryunosuke\dbml\Query\Expression\SelectOption

method ryunosuke\dbml\Query\Expression::SQL_CACHE () : ryunosuke\dbml\Query\Expression\SelectOption

method ryunosuke\dbml\Query\Expression::SQL_NO_CACHE () : ryunosuke\dbml\Query\Expression\SelectOption

method ryunosuke\dbml\Query\Expression::SQL_CALC_FOUND_ROWS () : ryunosuke\dbml\Query\Expression\SelectOption

method ryunosuke\dbml\Query\Expression::STRAIGHT_JOIN () : ryunosuke\dbml\Query\Expression\SelectOption

class ryunosuke\dbml\Query\Expression::Operator

演算子を表すクラス

内部的に使用されるだけで、明示的に使用する箇所はほとんど無い。
ただし、下記の演算子登録を使用する場合は ryunosuke\dbml\Query\Expression\Operator::define() で登録する必要がある。

組み込みの演算子は下記。これらは何もしなくても whereInto で使用することができる。

operatorresult説明
LIKE, BETWEEN, =, <>, etc...略。BETWEEN は値に配列を与える大体の RDBMS に備わっている標準的な演算子。想起される通りの動作するので説明は省略。他にも IN<=> 等がある。
'hoge:[~)' => [1, 9]hoge >= 1 AND hoge < 9範囲指定。 [~][] はイコール有り、() はイコール無しを意味する。つまり、 [~] [~) (~] (~) の4つの演算子がある。順に「以上・以下」「以上・小なり」「大なり・以下」「大なり・小なり」を意味する。
'hoge:[~)' => [1, null]hoge >= 1上記と同じ。ただし、バインド値に null を渡すと指定した方の条件が吹き飛ぶ
'hoge:[~)' => [null, 9]hoge < 9上記の後半部分版
'hoge:[~)' => [null, null]-バインド値に両方 null を渡すと条件自体が吹き飛ぶ
'hoge:LIKE%' => 'wo%rd'hoge LIKE 'wo\%rd%'LIKEエスケープを施した上で右に"%"を付加してLIKEする。他にも %LIKE %LIKE% がある
'hoge:LIKEIN%' => ['he%lo', 'wo%rd']hoge LIKE 'he\%lo%' OR hoge LIKE 'wo\%rd%'上記の配列IN版。構文的には LIKE ANY('str1', 'str2') みたいなもの
'hoge:NULLIN' => [1, 2, 3, NULL]hoge IN (1, 2, 3) OR hoge IS NULLNULL を許容できる IN。 [1, 2, 3, null] などとすると IN(1, 2, 3) or NULL のようになる
# 独自演算子 FISOR を定義する
Operator::define('FISOR', function ($column, $params) {
    $conds = array_fill(0, count($params), "FIND_IN_SET(?, $column)");
    return [implode(' OR ', $conds) => $params];
});

# すると whereInto の演算子指定で使用できるようになる
$db->whereInto(['col:FISOR' => [1, 2]]);
// WHERE FIND_IN_SET(1, col) OR FIND_IN_SET(2, col)

classconstant string ryunosuke\dbml\Query\Expression\Operator::RAW

classconstant string ryunosuke\dbml\Query\Expression\Operator::COLVAL

classconstant string ryunosuke\dbml\Query\Expression\Operator::OP_SPACESHIP

classconstant string ryunosuke\dbml\Query\Expression\Operator::OP_IS_NULL

classconstant string ryunosuke\dbml\Query\Expression\Operator::OP_BETWEEN

classconstant string ryunosuke\dbml\Query\Expression\Operator::OP_IN

classconstant string ryunosuke\dbml\Query\Expression\Operator::OP_RIGHT_LIKE

classconstant string ryunosuke\dbml\Query\Expression\Operator::OP_LEFT_LIKE

classconstant string ryunosuke\dbml\Query\Expression\Operator::OP_BOTH_LIKE

classconstant string ryunosuke\dbml\Query\Expression\Operator::OP_NULLIN

classconstant string ryunosuke\dbml\Query\Expression\Operator::OP_RIGHT_LIKEIN

classconstant string ryunosuke\dbml\Query\Expression\Operator::OP_LEFT_LIKEIN

classconstant string ryunosuke\dbml\Query\Expression\Operator::OP_BOTH_LIKEIN

classconstant string ryunosuke\dbml\Query\Expression\Operator::OP_RANGE

classconstant string ryunosuke\dbml\Query\Expression\Operator::OP_RANGE_LTE

classconstant string ryunosuke\dbml\Query\Expression\Operator::OP_RANGE_GTE

classconstant string ryunosuke\dbml\Query\Expression\Operator::OP_RANGE_BETWEEN

method ryunosuke\dbml\Query\Expression\Operator::define ($operator, $callback) : void

演算子を定義する

設定値として「カラム, 値を受け取り、[式 => パラメータ] を返すクロージャ」を与えなければならない。
(クラス冒頭のサンプルを参照)。

method ryunosuke\dbml\Query\Expression\Operator::__callStatic ($operator, $operands) : ryunosuke\dbml\Query\Expression\Operator

インスタンスを返す

これらはそれぞれ等価になる($platform は optional)。

method ryunosuke\dbml\Query\Expression\Operator::__construct ($platform, $operator, $operand1, $operand2) : void

コンストラクタ

method ryunosuke\dbml\Query\Expression\Operator::__toString () : string

文字列表現を返す

method ryunosuke\dbml\Query\Expression\Operator::not () : ryunosuke\dbml\Query\Expression\Operator

否定する

method ryunosuke\dbml\Query\Expression\Operator::getParams () : array

パラメータを返す

method ryunosuke\dbml\Query\Expression\Operator::getQuery () : string

クエリ文字列を返す

method ryunosuke\dbml\Query\Expression\Operator::merge (&$params) : string

パラメータをマージして文字列表現を返す

クエリ文字列を返し、引数配列にパラメータが追加される

namespace ryunosuke\dbml\Query\Pagination

class ryunosuke\dbml\Query\Pagination::Paginator

クエリビルダを渡して paginate するとページングしてくれるクラス

Sequencer と比較して下記の特徴がある。

要するに普通のページネータである。いわゆるページング(件数少なめ)として使用する。

$paginator = new Paginator($db->select('table_name', 'other where'));
// 2ページ目のレコードを取得する
$paginator->paginate(2, '1ページ内のアイテム数' [, '表示するページ数']);
// ページ内アイテムを表示
var_dump($paginator->getItems());
// IteratorAggregate を実装してるので foreach でも回せる
foreach ($paginator as $item) {
    var_dump($item);
}

method ryunosuke\dbml\Query\Pagination\Paginator::__construct ($builder) : void

コンストラクタ

method ryunosuke\dbml\Query\Pagination\Paginator::paginate ($currentpage, $countperpage, $shownpage = null) : ryunosuke\dbml\Query\Pagination\Paginator

現在ページとページ内アイテム数を設定する

method ryunosuke\dbml\Query\Pagination\Paginator::getItems () : array

現在アイテムを取得する

method ryunosuke\dbml\Query\Pagination\Paginator::getPage () : int

現在ページを返す

method ryunosuke\dbml\Query\Pagination\Paginator::getFirst () : int

最初のインデックスを返す

総数が0の時は0を返す

method ryunosuke\dbml\Query\Pagination\Paginator::getLast () : int

最後のインデックスを返す

総数が0の時は0を返す

method ryunosuke\dbml\Query\Pagination\Paginator::getTotal () : int

全アイテム数を返す

method ryunosuke\dbml\Query\Pagination\Paginator::getPageRange () : array

表示ページを配列で返す

method ryunosuke\dbml\Query\Pagination\Paginator::getPageCount () : int

全ページ数を返す

class ryunosuke\dbml\Query\Pagination::Sequencer

クエリビルダと条件カラムを渡して sequence するとシーケンシャルアクセスしてくれるクラス

Paginator と比較して下記の特徴がある。

「前・次のN件」(件数多め)のような UI で使用する。

$sequencer = new Sequencer($db->select('table_name', 'other where'));
// id が 150 以上のレコードを 50 件取得
$sequencer->sequence(['id' => 150], 50 [, '昇順降順フラグ']);
// ページ内アイテムを表示
var_dump($sequencer->getItems());
// IteratorAggregate を実装してるので foreach でも回せる
foreach ($sequencer as $item) {
    var_dump($item);
}

method ryunosuke\dbml\Query\Pagination\Sequencer::__construct ($builder) : void

コンストラクタ

method ryunosuke\dbml\Query\Pagination\Sequencer::sequence ($condition, $count, $orderbyasc = null, $bidirection = true) : ryunosuke\dbml\Query\Pagination\Sequencer

読み取り範囲を設定する

$condition は UNSIGNED な INT カラムを1つだけ含む配列である必要がある。なぜならば

が理由(大抵の場合 AUTO INCREMENT だろうから負数だったりタプルだったりは考慮しないことにする)。

method ryunosuke\dbml\Query\Pagination\Sequencer::getItems () : array

現在アイテムを取得する

method ryunosuke\dbml\Query\Pagination\Sequencer::getPrev () : arrayfalse

前以前が存在するならそれを、無いなら false を返す

method ryunosuke\dbml\Query\Pagination\Sequencer::getNext () : arrayfalse

次以降が存在するならそれを、無いなら false を返す

class ryunosuke\dbml\Query::QueryBuilder

クエリビルダークラス

SELECT に特化していて、 AFFECT 系クエリをビルドすることはできない。

IteratorAggregate, Countable

IteratorAggregate, Countable を実装しているので、 foreach で回すことができるし、count($qb) で件数の取得もできる。
foreach の取得処理は array() であり、レコードの配列(≒連想配列)が渡ってくる。 count() はその件数である。

$qb = $db->select('t_article');
foreach ($qb as $row) {
    // $row は ['id' => 1, 'title' => 'hoge title'] のような配列
}
echo count($qb); // t_article の件数を返す

プリペアードステートメント

明示的に prepare のようなメソッドを呼ばない限り内部のプリペアードステートメントでは名前付きパラメータを一切使用しない(ryunosuke\dbml\Query\Statement も参照)。
prepare を呼ぶと現時点のパラメータで固定することができ、その上で :name のような名前付きパラメータに値を渡すことができる。

classconstant array ryunosuke\dbml\Query\QueryBuilder::CLAUSES

classconstant string ryunosuke\dbml\Query\QueryBuilder::LAZY_MODE_EAGER

classconstant string ryunosuke\dbml\Query\QueryBuilder::LAZY_MODE_BATCH

classconstant string ryunosuke\dbml\Query\QueryBuilder::LAZY_MODE_FETCH

classconstant string ryunosuke\dbml\Query\QueryBuilder::LAZY_MODE_YIELD

classconstant array ryunosuke\dbml\Query\QueryBuilder::LAZY_MODES

method ryunosuke\dbml\Query\QueryBuilder::getDefaultOptions () : array

オプションのデフォルト値を返す static メソッド

このメソッドの返り値が構成要素とデフォルト値を担っていて、その配列以外のキーは基本的に保持できない。

method ryunosuke\dbml\Query\QueryBuilder::__construct ($database) : void

コンストラクタ

method ryunosuke\dbml\Query\QueryBuilder::__toString () : string

クエリ文字列を返す

method ryunosuke\dbml\Query\QueryBuilder::getDatabase () : ryunosuke\dbml\Database

データベースを返す

method ryunosuke\dbml\Query\QueryBuilder::cast ($classname = null) : ryunosuke\dbml\Query\QueryBuilder

取得クラスを指定。クラス名ならそのクラスで、コールバックならそれの呼び出し、になる

このメソッドを使うとこのインスタンスが返すレコード配列の型を指定できる。
指定の方法は大まかには下記の4種類。

  1. callable (行配列を受け取るクロージャ)
    • 最も汎用性がある
  2. クラス名
    • 与えたクラスのインスタンスで返却されるようになる
  3. null (あるいは未指定)
    • 駆動表から導き出されるエンティティクラスで返却されるようになる(指定がない場合はデフォルトエンティティ)
  4. "array" という文字列
    • 配列で返却するようになる(実質的に解除動作として動作する)
# 1. callable
$qb->column('table_name')->cast(function ($row) {
    // $row はレコードの各行の配列
    return new \ArrayObject($row, \ArrayObject::ARRAY_AS_PROPS);
});
// table_name のレコードを ArrayObject インスタンスで返すようになる

# 2. クラス名
$qb->column('table_name')->cast(EntityClass::class);
// table_name のレコードを EntityClass インスタンスで返すようになる

# 3. null(省略)
$qb->column('table_name')->cast();
// table_name のレコードを TableName インスタンスで返すようになる(駆動表 -> エンティティ名は Database に対して指定する)

# 4. "array"
$qb->column('table_name')->cast("array");
// 何もしなかった場合と変わらない。が、上記の 1~3 で設定したものを解除できるという重要な役割がある

なお、 このメソッドを呼んでも、 listspairs には一切影響しない。
これらは配列を返すメソッドであり、「レコード」という概念が通用しない。 value もスカラー値なので同様。

method ryunosuke\dbml\Query\QueryBuilder::build ($queryParts, $append = false) : ryunosuke\dbml\Query\QueryBuilder

各種設定メソッドへのプロクシメソッド

method ryunosuke\dbml\Query\QueryBuilder::setLazyMode ($lazyMode = null) : ryunosuke\dbml\Query\QueryBuilder

lazyMode を設定する

このメソッドを呼ぶと fetch 系メソッドは実行されなくなる。
引数無しで呼ぶと解除される。

method ryunosuke\dbml\Query\QueryBuilder::addSelectOption ($option) : ryunosuke\dbml\Query\QueryBuilder

select オプションを追加する

SELECT オプションとは「SELECT 句のカラム群の前に(カラムとは区別されて)置かれる文字列」のこと。
典型的には DISTINCT や STRAIGHT_JOIN など。

$qb->addSelectOption(SelectOption::SQL_CACHE)->column('test');
// SELECT SQL_CACHE test.* FROM test

method ryunosuke\dbml\Query\QueryBuilder::column ($tableDescriptor) : ryunosuke\dbml\Query\QueryBuilder

[table => [col1, col2]] のような指定を出来るようにする(クリア版)

かなり多彩な指定ができる(複雑とも言う)。

$qb->column([
    'table1' => [
        'aliasA'  => 'columnA',
        'aliasB'  => 'columnB',
        '+table2'  => [
            'aliasA' => 'columnA',
            'aliasB' => 'columnB',
        ],
        'table3' => [
            'aliasA' => 'columnA',
            'aliasB' => 'columnB',
        ],
    ],
    'table4' => [
        'aliasA' => 'columnA',
        'aliasB' => 'columnB',
    ],
]);

上記が基本構文となる。原則的には「取得したいテーブルの配下にカラムを置く」になる。
ネストさせると JOIN あるいは子テーブル取得になる(先頭の JOIN 記号で区別する)。
並列に並べると JOIN ではなく複数の FROM になる。

上記で言えば table1, table4 を駆動表として、table2 を JOIN、table3 を子テーブルとして取得する、というクエリになる。

実際は怠惰に文字列だけで指定できたり、糖衣構文が多数存在する。そもそも「テーブル名」を書く場所にテーブル記法が使えたりする。
ざっくりと記法を一覧したものが下記(No が飛んでいるのに深い意味はない)。

Notype説明
0['cond1', 'cond2' => 1]ネスト配列に素の配列を混ぜると JOIN 条件扱い
1"**"子テーブルを含めた全テーブル全列を取得
2nullnull を与えると「何も取得しない」を明示
4"!hoge"hoge 列以外を取得
5"!"仮想カラムを含めたテーブルの全列を取得(これは「空文字カラム以外を全て」を意味するので結局全てのカラムが得られる、ということになる)
8"..hoge"subselect 時において親のカラムを表す
10"+prefix.column_name"JOIN 記号+ドットを含む文字列は prefix テーブルと JOIN してそのカラムを取得
11new Expression("NOW()")ryunosuke\dbml\Query\Expression\Expression を与えると一切加工せずそのまま文字列を表す
12"NOW()"上と同じ。 () を含む文字列は自動で ryunosuke\dbml\Query\Expression\Expression 化される
22['alias' => function($row){}]キーが存在しないカラム指定のクロージャは行全体が渡ってくるコールバックになる
25['cname' => function($cname){}]キーが存在するカラム指定のクロージャはカラム値が単一で渡ってくるコールバックになる
27function(){return function($v){return $v;};}クロージャの亜種。クロージャを返すクロージャはそのままクロージャとして活きるのでメソッドのような扱いにできる
30Gateway objectGateway の表すテーブルとの ryunosuke\dbml\Database::subselect() 相当の動作
31['+alias' => Gateway object]Gateway の表すテーブルとの JOIN を表す
50'TableDescriptor'「テーブル名」を書く場所にはテーブル記法が使用できる(駆動表)
51['+TableDescriptor' => ['*']]「テーブル名」を書く場所にはテーブル記法が使用できる(JOIN)
80SelectOption::DISTINCT()SelectOption インスタンスを与えると addSelectOption と同等の効果を示す
98['' => ['expression']]空キーは「テーブルに紐付かないカラム指定」を表す
99['alias' => 'expression']上と同じ。存在しないテーブルは「テーブルに紐付かないカラム指定」とみなされる(notableAsColumn オプションが必要)

上記の通り、尋常ではないほど複雑なのでサンプルコードを以下に記す。

# No.0: 素の配列を混ぜると JOIN 条件になる(形式は where と全く同じ)
$qb->column([
    't_article A.*' => [
        '+t_comment: C.*' => [ // 外部キーがあると自動で ON が付くので、外すことを明示するために: が必要
            // 素の配列はそのテーブルと親テーブル(この場合 t_article と t_comment) の結合条件になる
            ['A.article_id = C.article_id', 'C.delete_flg' => 0],
        ],
    ],
]);

# No.1: t_ancestor に紐づく t_parent に紐づく t_child を怠惰に取得(*の数だけ子リレーションを辿る)
$qb->column('t_ancestor.***');

# No.2: null は何も取得しないがキーは活きる(t_article に紐づくリレーションを怠惰に取得したいが、特定テーブルは除きたい場合など)
$qb->column([
    't_article' => [
        '***',
        't_imgblob' => null,
        't_hugelog' => null,
    ],
]);

# No.4: ! を付けるとそのテーブル内でそれ以外を取得する
$qb->column([
    't_article' => [
        '!content', // 例えば一覧画面でデータ量の大きい本文を取得したくないときなど
    ],
]);

# No.8: "..hoge" で subselect における親カラムを参照できる
$qb->column([
    't_article' => [
        '*',
        't_comment C' => [
            '..article_title',             // 子テーブルのコンテキストで親のカラムが参照できる
            'atitle' => '..article_title', // 全く同じ。エイリアスも貼れる
        ],
    ],
]);

# No.10: 自動プレフィックス JOIN
$qb->column([
    't_comment' => [
        // このように値に join 記号+テーブル.カラムを置くと自動で JOIN される
        '+t_article.article_title',
        '+t_article.tags',
        // このように2つ並べても同テーブルであれば JOIN されるのは1回のみ
    ],
]);

# No.11, 12: Expression
$qb->column([
    't_article' => [
        'upper_title' => new Expression('UPPER(article_title)'), // タイトルを大文字で取得
        'upper_title' => 'UPPER(article_title)',                 // 全く同じ。カッコを含めば自動で Expression 化される
    ],
]);

# No.22: 行全体を受け取るクロージャ
$qb->column([
    't_article' => [
        // $row は行全体が渡ってくる
        'row' => function($row){},
    ],
]);

# No.25: カラム値を受け取るクロージャ
$qb->column([
    't_article' => [
        // AS 指定するとキーで指定した値を単一で受け取るクロージャになる
        'id AS idmul10'      => function($id){return $id * 10;},
        // カンマ区切りで複数指定すれば複数渡ってくる
        'id, name AS idname'      => function($id, $name){return "$id: $name";},
    ],
]);

# No.27: クロージャを返すクロージャ
$tuple = $qb->column([
    't_article.*' => [
        // クロージャ内の $this は行そのものを表す ArrayAccess なオブジェクトで bind される
        'func' => function(){return function($prefix){return $prefix . $this['name'];};},
    ],
])->tuple();
// 'func' にはクロージャが格納されているので呼び出しが可能
$tuple['func']('prefix-'); // => 'prefix-hogehoge'

# No.30, 31:配列で指定する箇所は Gateway も指定できる
$qb->column([
    't_article' => [
        'comments1'  => $db->t_comment, // t_comment を子テーブルとして取得する
        '+comments2' => $db->t_comment, // t_comment と JOIN される
    ],
]);

# No.50, 51:テーブル記法
$qb->column('t_article(1)'); // 主キー = 1 と同じ
$qb->column([
    // 駆動表にも使えるし
    't_article(1) AS A' => [
        // JOIN 表にも使える
        '+t_comment@scope[state: active] AS C' => ['*'],
    ]
]);
// 応用。アクティブな記事をID昇順で10件取り、そのそれぞれのコメントを作成日降順で3件ずつ取る(いわゆるグループ内のN件取得)
$qb->column([
    't_article[state: active]+id#0-10 AS A.*' => [
        't_comment-create_date#0-3 AS C.*' => []
    ],
]);

# No.80:SelectOption を与える
$qb->column([
    't_article' => [
        SelectOption::DISTINCT(),
        '*',
    ],
]);

# No.98: 空文字キーによるテーブルに紐付かないカラム指定(勝手に修飾されたり JOIN されたりせず、シンプルに SELECT 句に追加される)
$qb->column([
    't_table' => '*',
    '' => [
        'now' => 'NOW()',
        'ttc' => 't_table.colA',                 // 修飾子として動作する
        'ope' => ['column_name:LIKE' => 'hoge'], // operator として動作する
    ],
]);

# No.99: フラット指定によるテーブルに紐付かないカラム指定(同上。ただし、 now,ttc,ope のようなテーブルが存在しないことが条件)
$qb->column([
    't_table' => '*',
    'now' => 'NOW()',
    'ttc' => 't_table.colA',                 // 修飾子として動作する
    'ope' => ['column_name:LIKE' => 'hoge'], // operator として動作する
]);

method ryunosuke\dbml\Query\QueryBuilder::addColumn ($tableDescriptor, $parent = null) : ryunosuke\dbml\Query\QueryBuilder

[table => [col1, col2]] のような指定を出来るようにする(ryunosuke\dbml\Query\QueryBuilder::column() の追加版)

method ryunosuke\dbml\Query\QueryBuilder::select (...$selects) : ryunosuke\dbml\Query\QueryBuilder

select 列を設定する(クリア版)

method ryunosuke\dbml\Query\QueryBuilder::addSelect (...$selects) : ryunosuke\dbml\Query\QueryBuilder

select 列を設定する(ryunosuke\dbml\Query\QueryBuilder::select() の追加版)

method ryunosuke\dbml\Query\QueryBuilder::from ($table, $alias = null, $type = null, $condition = [], $fkeyname = null, $fromAlias = null) : ryunosuke\dbml\Query\QueryBuilder

FROM 句(JOIN 込)を構成する

結合タイプや結合条件をまとめて指定して FROM, JOIN を構成できるが、複雑極まりないので使用は非推奨(FROM 句の設定は ryunosuke\dbml\Query\QueryBuilder::column() を使用すれば基本的に不要)。

method ryunosuke\dbml\Query\QueryBuilder::join ($type, $table, $on, $fkeyname = null, $from = null) : ryunosuke\dbml\Query\QueryBuilder

結合タイプや結合条件、外部キーを指定して JOIN する

実際は下記のようなエイリアスメソッドが定義されているのでそちらを使うことが多く、明示的に呼ぶことはほとんどない。
さらに単純な JOIN であれば ryunosuke\dbml\Query\QueryBuilder::column() でも可能なため、ますます出番はない。

# 指定条件で ON して JOIN
$qb->from('t_from')->innerJoinOn('t_join', ['hoge = fuga']);
// SELECT  FROM t_from INNER JOIN t_join ON hoge = fuga

# 外部キーカラムで ON して JOIN
$qb->from('t_from')->innerJoinForeign('t_join', 'ForeignKeyName');
$qb->from('t_from')->innerJoinForeign('t_join'); // テーブル間外部キーが1つなら省略可能
// SELECT  FROM t_from INNER JOIN t_join ON t_from.foreign_col = t_join.foreign_col

# 外部キーカラムと指定条件で ON して JOIN
$qb->from('t_from')->innerJoinForeignOn('t_join', ['hoge = fuga'], 'ForeignKeyName');
// SELECT  FROM t_from INNER JOIN t_join ON ((t_from.foreign_col = t_join.foreign_col) AND (hoge = fuga))

method ryunosuke\dbml\Query::innerJoinOn ($table, $on, $from = null) : ryunosuke\dbml\Query\QueryBuilder

結合方法が INNER で結合条件指定の join()

method ryunosuke\dbml\Query::leftJoinOn ($table, $on, $from = null) : ryunosuke\dbml\Query\QueryBuilder

結合方法が LEFT で結合条件指定の join()

method ryunosuke\dbml\Query::rightJoinOn ($table, $on, $from = null) : ryunosuke\dbml\Query\QueryBuilder

結合方法が RIGHT で結合条件指定の join()

method ryunosuke\dbml\Query::autoJoinForeign ($table, $fkeyname = null, $from = null) : ryunosuke\dbml\Query\QueryBuilder

結合方法が AUTO で外部キー指定の join()

method ryunosuke\dbml\Query::innerJoinForeign ($table, $fkeyname = null, $from = null) : ryunosuke\dbml\Query\QueryBuilder

結合方法が INNER で外部キー指定の join()

method ryunosuke\dbml\Query::leftJoinForeign ($table, $fkeyname = null, $from = null) : ryunosuke\dbml\Query\QueryBuilder

結合方法が LEFT で外部キー指定の join()

method ryunosuke\dbml\Query::rightJoinForeign ($table, $fkeyname = null, $from = null) : ryunosuke\dbml\Query\QueryBuilder

結合方法が RIGHT で外部キー指定の join()

method ryunosuke\dbml\Query::autoJoinForeignOn ($table, $on, $fkeyname = null, $from = null) : ryunosuke\dbml\Query\QueryBuilder

結合方法が AUTO で結合条件・外部キー指定の join()

method ryunosuke\dbml\Query::innerJoinForeignOn ($table, $on, $fkeyname = null, $from = null) : ryunosuke\dbml\Query\QueryBuilder

結合方法が INNER で結合条件・外部キー指定の join()

method ryunosuke\dbml\Query::leftJoinForeignOn ($table, $on, $fkeyname = null, $from = null) : ryunosuke\dbml\Query\QueryBuilder

結合方法が LEFT で結合条件・外部キー指定の join()

method ryunosuke\dbml\Query::rightJoinForeignOn ($table, $on, $fkeyname = null, $from = null) : ryunosuke\dbml\Query\QueryBuilder

結合方法が RIGHT で結合条件・外部キー指定の join()

method ryunosuke\dbml\Query\QueryBuilder::where (...$predicates) : ryunosuke\dbml\Query\QueryBuilder

引数内では AND、引数間では OR する where(クリア版)

基本は ryunosuke\dbml\Database::whereInto() の where 記法と同じ。加えて下記の記法が使用できる。

Nowhere説明
30['' => 123]キーを空文字にすると駆動表の主キーを表す
31['C' => 'childwhere']サブビルダの名前をキーにして配列を渡すと「その子供ビルダの where」を意味する
32['C/childwhere']サブビルダの名前を "/" で区切ると「その子供ビルダの where」を意味する
33['*.delete_flg' => 1]テーブル部分に * を指定すると「あらゆるテーブルのそのカラム」を意味する
34['*' => "hoge"]* を指定すると「よしなに検索」となる。ryunosuke\dbml\Database::anywhere() も参照
# 引数配列内では AND、引数間では OR される
$qb->where(['hoge = 1', 'fuga = ?' => 1], ['piyo' => 1]); // WHERE (hoge = 1 AND fuga = 1) OR (piyo = 1)

# No.30(空キーは駆動表の主キーを表す)
$qb->column('t_article')->where(['' => 123]);            // WHERE article_id = 123
$qb->column('t_article')->where(['' => [123, 456]]);     // WHERE article_id IN (123, 456)
$qb->column('t_multi')->where(['' => [123, 456]]);       // WHERE id1 = 123 AND id2 = 456
$qb->column('t_multi')->where(['' => [[1, 2], [3, 4]]]); // WHERE (id1 = 1 AND id2 = 2) OR (id1 = 3 AND id2 = 4)

# No.31, 32(糖衣構文であり、できることは同じ)
$qb->column('t_parent P/t_child C')->where([
    // P(親)の WHERE
    'P.delete_time' => 0,
    // エイリアスキーを指定して配列でネストすると子ビルダの WHERE を意味する
    'C'             => [
        // C(子)の WHERE
        'C.approval_flg' => 1,
    ],
    // "/" 区切り。上記と全く同じ
    'C/approval_flg' => 1, // 修飾する場合は 'C/C.approval_flg'
]);

# No.33(例えば対象テーブルに delete_flg があり、 delete_flg = 0 を付与したい場合、下記のようにすると全てのテーブルに付与される)
$qb->column('table1 t1, table2 t2, table3 t3')->where(['*.delete_flg' => 0]); // WHERE (t1.delete_flg = 0) AND (t2.delete_flg = 0) AND (t3.delete_flg = 0)

# No.34(table1, table2, table3 から "hoge" でよしなに検索する)
$qb->column('table1 t1, table2 t2, table3 t3')->where(['*.*' => 'hoge']); // テーブル定義次第だが、全テーブルのあらゆるテキスト系カラムで LIKE "%hoge%" される
$qb->column('table1 t1, table2 t2, table3 t3')->where(['t2.*' => 'hoge']); // "*.*" ではなく "エイリアス名.*" とすると全テーブルではなく指定したものだけよしなにされる

method ryunosuke\dbml\Query\QueryBuilder::notWhere (...$predicates) : ryunosuke\dbml\Query\QueryBuilder

NOT つきで引数内では AND、引数間では OR する where(クリア版)

NOT が付くこと以外は ryunosuke\dbml\Query\QueryBuilder::where() と同じ。

method ryunosuke\dbml\Query\QueryBuilder::andWhere (...$predicates) : ryunosuke\dbml\Query\QueryBuilder

引数内では AND、引数間では OR する(ryunosuke\dbml\Query\QueryBuilder::where() の追加版)

クリアされずに追加されること以外は ryunosuke\dbml\Query\QueryBuilder::where() と同じ。

method ryunosuke\dbml\Query\QueryBuilder::andNotWhere (...$predicates) : ryunosuke\dbml\Query\QueryBuilder

NOT つきで引数内では AND、引数間では OR する(ryunosuke\dbml\Query\QueryBuilder::notWhere() の追加版)

クリアされずに追加されること以外は ryunosuke\dbml\Query\QueryBuilder::notWhere() と同じ。

method ryunosuke\dbml\Query\QueryBuilder::groupBy (...$groupBy) : ryunosuke\dbml\Query\QueryBuilder

[table => array(col1, col2)] のように指定できるように拡張した ryunosuke\dbml\Query\QueryBuilder::groupBy()(クリア版)

 # シンプルにカラムを指定
$qb->groupBy('id1');          // GROUP BY id1
$qb->groupBy('id1', 'id2');   // GROUP BY id1, id2

# 配列も指定できる。キーを与えるとテーブルプレフィックスになる
$qb->groupBy(['id1', 'id2']);          // GROUP BY id1, id2
$qb->groupBy(['T' => ['id1', 'id2']]); // GROUP BY T.id1, T.id2

# 配列指定で子ビルダを設定
$qb->column('t_parent P/t_child C')->groupBy([
    // P(親)の GROUP BY
    'parent_id',
    // エイリアスキーを指定して配列でネストすると子ビルダの GROUP BY を意味する
    'C'           => [
        // C(子)の GROUP BY
        'child_id',
    ],
     // "/" 区切り。上記と全く同じ
    'C/child_id', // 修飾する場合は 'C/C.child_id'
]);

method ryunosuke\dbml\Query\QueryBuilder::addGroupBy (...$groupBy) : ryunosuke\dbml\Query\QueryBuilder

[table => [col1, col2]] のように指定できるように拡張した ryunosuke\dbml\Query\QueryBuilder::groupBy()(追加版)

method ryunosuke\dbml\Query\QueryBuilder::having (...$predicates) : ryunosuke\dbml\Query\QueryBuilder

引数内では AND、引数間では OR する having(クリア版)

WHERE ではなく HAVING である点を除いて引数体系などは ryunosuke\dbml\Query\QueryBuilder::where() と同じ。

method ryunosuke\dbml\Query\QueryBuilder::notHaving (...$predicates) : ryunosuke\dbml\Query\QueryBuilder

NOT つきで引数内では AND、引数間では OR する having(クリア版)

NOT が付くこと以外は ryunosuke\dbml\Query\QueryBuilder::having() と同じ。

method ryunosuke\dbml\Query\QueryBuilder::andHaving (...$predicates) : ryunosuke\dbml\Query\QueryBuilder

引数内では AND、引数間では OR する(ryunosuke\dbml\Query\QueryBuilder::having() の追加版)

クリアされずに追加されること以外は ryunosuke\dbml\Query\QueryBuilder::having() と同じ。

method ryunosuke\dbml\Query\QueryBuilder::andNotHaving (...$predicates) : ryunosuke\dbml\Query\QueryBuilder

NOT つきで引数内では AND、引数間では OR する(ryunosuke\dbml\Query\QueryBuilder::notHaving() の追加版)

クリアされずに追加されること以外は ryunosuke\dbml\Query\QueryBuilder::notHaving() と同じ。

method ryunosuke\dbml\Query\QueryBuilder::orderBy ($sort, $order = null) : ryunosuke\dbml\Query\QueryBuilder

[col => ASC] のように指定できるように拡張した orderBy(クリア版)

ORDER BY 句を設定する。
渡し方が引数だったり配列だったりするのでややこしく見えるが、原則として {カラム名, 順序} のタプルを渡す。
「カラム名」に特記事項はない。「順序」は 未指定, 'ASC', true などが昇順を表し、 'DESC', false などが降順を表す。

# シンプルなカラム ORD
$qb->orderBy('col');         // ORDER BY col ASC
$qb->orderBy('col', true);   // ORDER BY col ASC
$qb->orderBy('col', 'ASC');  // ORDER BY col ASC
$qb->orderBy('col', false);  // ORDER BY col DESC
$qb->orderBy('col', 'DESC'); // ORDER BY col DESC

# [col => ORD] 形式
$qb->orderBy(['colA' => 'ASC', 'colB' => false]);  // ORDER BY colA ASC, colB DESC
$qb->orderBy(['colA' => true, 'colB' => 'DESC']);  // ORDER BY colA ASC, colB DESC
$qb->orderBy(['colA', 'colB' => false]);           // ORDER BY colA ASC, colB DESC

# [+col, -col] 形式
$qb->orderBy('+colA');            // ORDER BY colA ASC
$qb->orderBy(['-colA', '+colB']); // ORDER BY colA DESC, colB ASC

# [col, col, col], ORD 形式
$qb->orderBy(['colA', 'colB', 'colC'], false);  // ORDER BY colA DESC, colB DESC, colC DESC

# 配列指定で子ビルダを設定
$qb->column('t_parent P/t_child C')->orderBy([
    // P(親)の ORDER
    'P.parent_id' => 'ASC',
    // エイリアスキーを指定して配列でネストすると子ビルダの ORDER BY を意味する
    'C'           => [
        // C(子)の ORDER
        'C.comment_time' => 'DESC',
    ],
     // "/" 区切り。上記と全く同じ
    'C/comment_time' => 'DESC', // 修飾する場合は 'C/C.comment_time'
]);

特殊な機能として、SQL レイヤではなく、「取得後にアプリレイヤでソートする」機能があり、クロージャを渡すとそのような動作になる。

# シンプルにクロージャを渡すと uasort される($a, $b は行配列)
$qb->orderBy(function ($a, $b) {
     // アプリレイヤ で id 降順になる
     return $a['id'] - $b['id'];
});

# 空文字キーで配列を渡すと https://arima-ryunosuke.github.io/php-functions/#ryunosuke\Functions\Package\Arrays::array_order() 相当の動作になる
$qb->orderBy([
    '' => [
        'colA' => misc,
        'colB' => misc,
        'colC' => misc,
    ],
]);

method ryunosuke\dbml\Query\QueryBuilder::addOrderBy ($sort, $order = null) : ryunosuke\dbml\Query\QueryBuilder

[col => ASC] のように指定できるように拡張した ryunosuke\dbml\Query\QueryBuilder::orderBy()(追加版)

method ryunosuke\dbml\Query\QueryBuilder::orderBySecure ($sort, $order = null) : ryunosuke\dbml\Query\QueryBuilder

実在するカラムやエイリアスをチェックするセキュアな orderBy

以外は何もせずスルーされる。
その性質上、事前に実行しておくことは出来ない。

// test に id カラムは存在するので order by id される
$db->select('test')->orderBySecure('id');

// 修飾しても OK
$db->select('test')->orderBySecure('test.id');

// Expression インスタンスは無条件で OK
$db->select('test.id AS hoge')->orderBySecure(new Expression('NOW()'));

// test に hoge カラムは存在しないが id のエイリアスなので OK
$db->select('test.id AS hoge')->orderBySecure('hoge');

// test に fuga カラムは存在せず、エイリアスもないため、このメソッドは何も行わない
$db->select('test.id as hoge')->orderBySecure('fuga');

エラーや例外が出ないので挙動が分かりにくいが、下手にエラーを出すと「攻撃が可能そう」に見えてしまうのでこのような動作にしている。

method ryunosuke\dbml\Query\QueryBuilder::orderByPrimary ($is_asc = true) : ryunosuke\dbml\Query\QueryBuilder

主キーによる orderBy

method ryunosuke\dbml\Query\QueryBuilder::limit ($count, $offset = null) : ryunosuke\dbml\Query\QueryBuilder

(count, offset) or [offset => length] or [offset, length] のように指定できるようにする

LIMIT OFFSET 句を設定する。

# シンプルにスカラーで指定
$qb->limit(10);     // LIMIT 10
$qb->limit(10, 20); // LIMIT 10 OFFSET 20

# 配列で指定(単純引数でも連想配列でも指定できる)。意味合いがスカラー指定と逆になっているので注意
$qb->limit([20, 10]);   // LIMIT 10 OFFSET 20
$qb->limit([20 => 10]); // LIMIT 10 OFFSET 20

# 配列キー指定で子ビルダを設定
$qb->column('t_parent P/t_child C')->limit([
    // P(親)の LIMIT
    [0 => 20],
    // エイリアスキーを指定して配列でネストすると子ビルダの LIMIT を意味する
    'C' => [
        // C(子)の LIMIT
        [0 => 10],
    ],
]);

method ryunosuke\dbml\Query\QueryBuilder::page ($page, $limit = null) : ryunosuke\dbml\Query\QueryBuilder

ページ単位として LIMIT OFFSET する

できることは ryunosuke\dbml\Query\QueryBuilder::limit() と同じ。指定の仕方が異なるだけ。
limit() は LIMIT, OFFSET をダイレクトに指定するが、こちらは一定の単位(ページ)で設定する。
「LIMIT ありきで、それを元に OFFSET する」とも言える。

ryunosuke\dbml\Query\Pagination\Paginator は全く関係ない

# 10 件ごと 5 ページ目を設定
$qb->page(5, 10);        // LIMIT 10 OFFSET 50

# あらかじめ limit 設定しておけば第2引数は省略できる
$qb->limit(10)->page(5); // LIMIT 10 OFFSET 50

method ryunosuke\dbml\Query\QueryBuilder::comment ($comment) : ryunosuke\dbml\Query\QueryBuilder

クエリに対してコメントを付ける

コメントはクエリ冒頭に改行付きで付与される。複数設定した場合はその分付与される。
コメント内に : や ? などのメタ的な文字列を含んではならない。

# 単一文字列は追加される
echo $qb->column('test')->comment('hoge')->comment('fuga');
// -- hoge
// -- fuga
// SELECT * FROM test

# 配列は置換される
echo $qb->column('test')->comment('foo')->comment(['hoge', 'fuga']);
// -- hoge
// -- fuga
// SELECT * FROM test

# 配列は置換されるので削除も行える
echo $qb->column('test')->comment([]);
// SELECT * FROM test

method ryunosuke\dbml\Query\QueryBuilder::union ($query) : ryunosuke\dbml\Query\QueryBuilder

UNION する

UNION を行うと「UNION テーブルから自身のクエリビルダを利用して SELECT する」という動作になる。
言い換えれば「自身の各句は UNION テーブルのためのものになる」となる。

$qb = $db->select([
    // 後の union のための column 指定
    '' => ['title', 'content']
], [
    // 後の union のための where 指定
    'status' => 'active',
]);
// t_article と t_comment を union する(これが駆動表となる)
$qb->union($db->select('t_article'));
$qb->union($db->select('t_comment'));
echo $qb;
// SELECT title, content FROM
// (
//   SELECT t_article.* FROM t_article
//   UNION
//   SELECT t_comment.* FROM t_comment
// ) __dbml_union_table
// WHERE status = 'active'

method ryunosuke\dbml\Query\QueryBuilder::unionAll ($query) : ryunosuke\dbml\Query\QueryBuilder

UNION ALL する

ALL で UNION される以外は ryunosuke\dbml\Query\QueryBuilder::union() と全く同じ。

method ryunosuke\dbml\Query\QueryBuilder::set ($sets = []) : ryunosuke\dbml\Query\QueryBuilder

SET 句の設定

ほぼ内部向け。

method ryunosuke\dbml\Query\QueryBuilder::getColval () : array

設定されている SELECT 句から SET に流用できそうなカラムペアを返す

method ryunosuke\dbml\Query\QueryBuilder::countize ($column = "*") : ryunosuke\dbml\Query\QueryBuilder

COUNT(*) クエリ化(厳密に言えば limit なしの COUNT(*) 化)

# status: 'active' の COUNT(*) を発行する
$qb->column('t_article')->where(['status' => 'active'])->countize();
// SELECT COUNT(*) AS __dbml_auto_cnt FROM t_article WHERE status = 'active'

method ryunosuke\dbml\Query\QueryBuilder::paginate ($currentpage, $countperpage, $shownpage = null) : ryunosuke\dbml\Query\Pagination\Paginator

new Paginator へのプロキシメソッド

引数が与えられている場合は ryunosuke\dbml\Query\Pagination\Paginator::paginate() も同時に行う。

method ryunosuke\dbml\Query\QueryBuilder::sequence ($condition, $count, $orderbyasc = null, $bidirection = true) : ryunosuke\dbml\Query\Pagination\Sequencer

new Sequencer へのプロキシメソッド

引数が与えられている場合は ryunosuke\dbml\Query\Pagination\Sequencer::sequence() も同時に行う。

method ryunosuke\dbml\Query\QueryBuilder::chunk ($chunk, $column = null) : \Generator

分割して sequence してレコードジェネレータを返す

例えば 150 件のレコードに対して chunk: 10 するとクエリを 15 回に分けて実行する。
そのそれぞれのクエリは別々であり、php 側 にも db 側にもバッファは作られないためメモリ効率が非常に良い(そのかわりそこまで高速ではない)。

一般的な実装と違い、下記の制限がある。

そのかわり chunk 内でレコードの更新を行ってもズレが発生しないようになっている。

// 100 件ずつループする
foreach ($qb->where(['status' => 'active'])->chunk(100) as $row) {
    // do something
    var_dump($row['id']);
}
// SELECT * FROM t_table WHERE (status = "active") AND (id > 0) ORDER BY id ASC LIMIT 100
// SELECT * FROM t_table WHERE (status = "active") AND (id > 100) ORDER BY id ASC LIMIT 100
// SELECT * FROM t_table WHERE (status = "active") AND (id > 200) ORDER BY id ASC LIMIT 100
// ・・・のようなクエリが順次投げられる(Generator で返されるので分割されていることは意識しなくて良い)

method ryunosuke\dbml\Query\QueryBuilder::neighbor ($predicates, $limit = 1) : array

特定レコードの前後のレコードを返す

結果配列は特定レコードとの距離がキーになり、かつ昇順でソートされる。

# id:5 の前後のレコードを1行ずつ返す
$qb->neighbor(['id' => 5]);
// results:
[
    -1 => ['id' => 4],
    1  => ['id' => 6],
];

# id:5 の前後のレコードを2行ずつ返す
$qb->neighbor(['id' => 5], 2);
// results:
[
    -2 => ['id' => 3],
    -1 => ['id' => 4],
    1  => ['id' => 6],
    2  => ['id' => 7],
];

# 前後が無い場合、無い方は含まれない
$qb->neighbor(['id' => 99999], 2);
// results:
[
    // 99999 より大きいレコードが無いとすると負数キー(前後の前)のみ返ってくる
    -2 => ['id' => 99997],
    -1 => ['id' => 99998],
];

method ryunosuke\dbml\Query\QueryBuilder::postselect ($parents, $continuity = false) : array

行フェッチ後に QueryBuilder 特有の処理を行う

ほぼ内部処理で明示的に呼ぶことはない。

method ryunosuke\dbml\Query\QueryBuilder::wrap ($keyword1, $keyword2 = "", $name = null) : ryunosuke\dbml\Query\QueryBuilder

特定文字列でラップする

典型的には EXISTS だが、それ以外の「何らかの文字列で囲みたい」場合に汎用的に使用できる。
(もっとも、 EXISTS は専用メソッドが有るので使用頻度はそこまで高くない)。

ラップ文字は追加で積み重なっていくが、第3引数($name)を指定すると、種別を指定できて、後から上書きすることができる。

$qb->column('t_article')->wrap('A', 'B');
// A (SELECT t_article.* FROM t_article) B

# 種別なしでラップ(積み重ね)
$qb->column('t_article')->wrap('A', 'B')->wrap('C', 'D');
// C (A (SELECT t_article.* FROM t_article) B) D

# 種別を hoge でラップ(上書き)
$qb->column('t_article')->wrap('A', 'B', 'hoge')->wrap('C', 'D', 'hoge');
// C (SELECT t_article.* FROM t_article) D

method ryunosuke\dbml\Query\QueryBuilder::exists () : ryunosuke\dbml\Query\QueryBuilder

EXISTS でラップして返す

ryunosuke\dbml\Query\QueryBuilder::wrap() の特化メソッド。

method ryunosuke\dbml\Query\QueryBuilder::notExists () : ryunosuke\dbml\Query\QueryBuilder

NOT EXISTS でラップして返す

ryunosuke\dbml\Query\QueryBuilder::wrap() の特化メソッド。

method ryunosuke\dbml\Query\QueryBuilder::aggregate ($aggregations, $select_limit = ryunosuke\dbml\Query\PHP_INT_MAX) : ryunosuke\dbml\Query\QueryBuilder

集約関数化する

ryunosuke\dbml\Database::aggregate() のためのヘルパーメソッドで、明示的には呼ばれないし呼ばない。

method ryunosuke\dbml\Query\QueryBuilder::hint ($hint, $talias = null) : ryunosuke\dbml\Query\QueryBuilder

ヒント句を追加する

第2引数で紐づくテーブルを指定できるが、省略すると(その時点の)駆動表と紐づく。

RDBMS の方言は吸収しないのでダイレクトに与える必要がある。
(一応 ryunosuke\dbml\Metadata\CompatiblePlatform::getIndexHintSQL() に実装がある)。

// SELECT * FROM tablename FORCE INDEX (PRIMARY)
$qb->column('tablename')->hint('FORCE INDEX (PRIMARY)');

method ryunosuke\dbml\Query\QueryBuilder::lockInShare ($lockoption = null) : ryunosuke\dbml\Query\QueryBuilder

共有ロック構文を付与する

$lockoption で付随するロックオプション(SKIP LOCKED とか)を指定できる(共有ロックで指定することはあまりないと思うけど)。
SKIP LOCKED などは有用だが方言がかなり激しく正規化が難しいので文字列で指定する。
ただし、 SqlServer は未対応(Doctrine 側が対応していない)。

# 共有ロック(mysql)
$qb->column('t_article')->lockInShare();
// SELECT t_article.* FROM t_article LOCK IN SHARE MODE

method ryunosuke\dbml\Query\QueryBuilder::lockForUpdate ($lockoption = null) : ryunosuke\dbml\Query\QueryBuilder

排他ロック構文を付与する

$lockoption で付随するロックオプション(SKIP LOCKED とか)を指定できる。
SKIP LOCKED などは有用だが方言がかなり激しく正規化が難しいので文字列で指定する。
ただし、 SqlServer は未対応(Doctrine 側が対応していない)。

# 排他ロック(mysql)
$qb->column('t_article')->lockForUpdate();
// SELECT t_article.* FROM t_article FOR UPDATE

# オプション付き排他ロック(postgres や mysql 8.0)
$qb->column('t_article')->lockForUpdate('SKIP LOCKED');
// SELECT t_article.* FROM t_article FOR UPDATE SKIP LOCKED

method ryunosuke\dbml\Query\QueryBuilder::unlock () : ryunosuke\dbml\Query\QueryBuilder

ロックを解除する

ryunosuke\dbml\Query\QueryBuilder::lockInShare()ryunosuke\dbml\Query\QueryBuilder::lockForUpdate() で追加したロック構文を解除する。

$qb->column('t_article');

# 排他ロック
$qb->lockForUpdate();
// SELECT t_article.* FROM t_article FOR UPDATE

# ロック解除
$qb->unlock();
// SELECT t_article.* FROM t_article

method ryunosuke\dbml\Query\QueryBuilder::detectAutoOrder ($use) : ryunosuke\dbml\Query\QueryBuilder

自動主キーソートの有効無効を設定する

select メソッドの第3引数、あるいは orderBy メソッドにて ORDER 句が指定されなかった場合、自動で駆動表の主キーカラムが設定される。

この自動 ORDER はあくまで駆動表の主キーであり、 JOIN した結果の並び順は未定義である。
JOIN を含めて ORDER したい場合は明示的に orderBy するか、あるいは JOIN 狙いのインデックスを作るとか生クエリを書くとかそういった方面で対処しなければならない。

autoOrder が無効ならそもそも無意味だが、その設定に関わらず下記のような場合は付加されない。

method ryunosuke\dbml\Query\QueryBuilder::getSubbuilder ($name = null) : ryunosuke\dbml\Query\QueryBuilderryunosuke\dbml\Query\QueryBuilder[]

サブクエリビルダを返す

$select = $db->select('t_parent/t_child');
# t_child のサブクエリビルダを返す
$select->getSubbuilder('t_child');
# 全サブクエリビルダを返す
$select->getSubbuilder();

このメソッドでサブビルダを取得すると、テーブル記法や簡易記法で記述した子供ビルダに対して各句を指定することができる。

$qb->column([
    't_table' => [
        't_child AS children' => [],
    ],
]);
$qb->getSubbuilder('children')->where(['delete_time' => 0])->orderBy(['update_time' => 'DESC'])->limit(5);

method ryunosuke\dbml\Query\QueryBuilder::getFromPart () : array

FROM 句(from,join)を返す

ryunosuke\dbml\Query\QueryBuilder::getQueryPart() でも得られるが、 FROM は JOIN も兼ねており、ややこしい構造になっているのでそれを補正しつつシンプルな構造で返す。

$qb->column('t_article A + t_comment C');
$qb->getFromPart();
// result:
[
    'A' => [
        'from'      => null,
        'table'     => 't_article',
        'alias'     => 'A',
        'fkeyname'  => null,
        'condition' => [],
    ],
    'C' => [
        'from'      => 'A',
        'table'     => 't_comment',
        'alias'     => 'C',
        'fkeyname'  => null,
        'condition' => null,
        'type'      => 'INNER',
    ],
];

method ryunosuke\dbml\Query\QueryBuilder::getQueryPart ($queryPartName) : mixed

SQL の各句を返す

method ryunosuke\dbml\Query\QueryBuilder::resetQueryPart ($queryPartName = null) : ryunosuke\dbml\Query\QueryBuilder

SQL の各句をリセットする

引数でリセットする句を指定する。
配列を与えると複数の句をリセットする。
null を与えると全句をリセットする。

$qb = $db->select('t_article', ['article_id' => 1], ['article_id' => 'DESC'], 5);

# where をリセット
$qb->resetQueryPart('where');
// SELECT t_article.* FROM t_article ORDER BY article_id DESC LIMIT 5

# limit をリセット
$qb->resetQueryPart('limit');
// SELECT t_article.* FROM t_article ORDER BY article_id DESC

# orderBy をリセット
$qb->resetQueryPart('orderBy');
// SELECT t_article.* FROM t_article

method ryunosuke\dbml\Query\QueryBuilder::reset () : ryunosuke\dbml\Query\QueryBuilder

すべてを無に帰す

method ryunosuke\dbml\Query\QueryBuilder::prepare () : ryunosuke\dbml\Query\QueryBuilder

現在のビルダの状態で固定して prepare する

「preparedStatement を返す」のではなく「prepare 状態にするだけ」なのに注意。
preparedStatement は ryunosuke\dbml\Query\QueryBuilder::getPreparedStatement() で取得する。

$qb->column('t_article', ['state' => 'active', 'id = :id']);
# 現在の状態で prepare する
$qb->prepare();
// この段階では state: active は固定されているが、:id は未確定
$stmt = $qb->getPreparedStatement();
// ここで実行することで id: 1 がプリペアで実行される
$stmt->executeQuery(['id' => 1]); // SELECT t_article.* FROM t_article WHERE (id = 1) AND (state = "active")
// さらに続けてプリペアで id: 2 を実行できる
$stmt->executeQuery(['id' => 2]); // SELECT t_article.* FROM t_article WHERE (id = 2) AND (state = "active")

method ryunosuke\dbml\Query\QueryBuilder::getPreparedStatement () : ryunosuke\dbml\Query\Statement

prepare したステートメントを返す

ryunosuke\dbml\Query\QueryBuilder::prepare() の例も参照。

method ryunosuke\dbml\Query\QueryBuilder::queryInto () : string

パラメータを利用してクエリ化

method ryunosuke\dbml\Query\QueryBuilder::getQuery () : string

クエリ文字列を返す

method ryunosuke\dbml\Query\QueryBuilder::getParams ($queryPartName = null) : array

パラメータを返す

method ryunosuke\dbml\Query\QueryBuilder::merge (&$params) : string

パラメータをマージして文字列表現を返す

クエリ文字列を返し、引数配列にパラメータが追加される

method ryunosuke\dbml\Query::getDefaultLazyMode () : string

method ryunosuke\dbml\Query::setDefaultLazyMode ($string) : ryunosuke\dbml\Query\QueryBuilder

[] や Gateway 指定時のデフォルト sub lazy mode

method ryunosuke\dbml\Query::getAutoOrder () : bool

method ryunosuke\dbml\Query::setAutoOrder ($bool) : ryunosuke\dbml\Query\QueryBuilder

自動で主キー順にするか(ryunosuke\dbml\Query\QueryBuilder::detectAutoOrder() を参照)

method ryunosuke\dbml\Query::getPrimarySeparator () : string

method ryunosuke\dbml\Query::setPrimarySeparator ($string) : ryunosuke\dbml\Query\QueryBuilder

主キー区切り文字を設定する

自動で子供テーブルをひっぱるような処理において、その配列のキーは主キーになる。
ただし、単純な親子テーブルを引っ張るような場合は自動でよしなに一意性を検出してキーとする。

  1. 共に自動採番主キーである親テーブルと子テーブル
  2. 親テーブルへの外部キーが複合主キーの一部である子テーブル

1 の場合は共に自動採番なので子テーブルのキーは主キーになる。区切り文字は使われない。
2 の場合は複合主キーであり、単一カラムで表すことはできないが、「自動で子供テーブルを引っ張る」ような処理は外部キーを元に引っ張るのでその子供の世界では複合主キーの片方だけで一意になる。
つまり結果として区切り文字は使われない。

それでも冗長にキーを持っていたりするとどうしても自動では一意性が検出できない場合がある。
そのような場合に結合する文字列を指定する。

method ryunosuke\dbml\Query::getAggregationDelimiter () : string

method ryunosuke\dbml\Query::setAggregationDelimiter ($string) : ryunosuke\dbml\Query\QueryBuilder

集約関数の区切り文字を設定する

min, max などの集約関数を実行するときに付与される文字列を指定する。
集約関数は大抵の場合は単一クエリで実行するので大部分で指定不要だが、時折指定が必要になることがある。

# こういった個別メソッドの場合は指定する意味はない(区切りも何もスカラー値で取れるんだから)
$db->min('table');
// results: 1

# このように aggregate メソッドを使用したときに活きる
$db->aggregate(['min', 'max'], 'table.id', [], 'table.group_id');
// results:
[
    1 => [
        'table.id@min' => 1,
        'table.id@max' => 2,
    ],
]

method ryunosuke\dbml\Query::getPropagateLockMode () : bool

method ryunosuke\dbml\Query::setPropagateLockMode ($bool) : ryunosuke\dbml\Query\QueryBuilder

method ryunosuke\dbml\Query::getInjectChildColumn () : bool

method ryunosuke\dbml\Query::setInjectChildColumn ($bool) : ryunosuke\dbml\Query\QueryBuilder

method ryunosuke\dbml\Query::array ($params = []) : ryunosuke\dbml\Query\QueryBuilderarrayryunosuke\dbml\Entity\Entityable[]

自身が保持しているクエリでレコードの配列を返す(ryunosuke\dbml\Database::fetchArray() 参照)

method ryunosuke\dbml\Query::assoc ($params = []) : ryunosuke\dbml\Query\QueryBuilderarrayryunosuke\dbml\Entity\Entityable[]

自身が保持しているクエリでレコードの連想配列を返す(ryunosuke\dbml\Database::fetchAssoc() 参照)

method ryunosuke\dbml\Query::lists ($params = []) : ryunosuke\dbml\Query\QueryBuilderarray

自身が保持しているクエリでレコード[1列目]の配列を返す(ryunosuke\dbml\Database::fetchLists() 参照)

method ryunosuke\dbml\Query::pairs ($params = []) : ryunosuke\dbml\Query\QueryBuilderarray

自身が保持しているクエリでレコード[1列目=>2列目]の連想配列を返す(ryunosuke\dbml\Database::fetchPairs() 参照)

method ryunosuke\dbml\Query::tuple ($params = []) : ryunosuke\dbml\Query\QueryBuilderarrayryunosuke\dbml\Entity\Entityablefalse

自身が保持しているクエリでレコードを返す(ryunosuke\dbml\Database::fetchTuple() 参照)

method ryunosuke\dbml\Query::value ($params = []) : ryunosuke\dbml\Query\QueryBuildermixed

自身が保持しているクエリでレコード[1列目]を返す(ryunosuke\dbml\Database::fetchValue() 参照)

class ryunosuke\dbml\Query::Statement

Statement をラップして扱いやすくしたクラス

主にプリペアドステートメントのために存在する。よってエミュレーションモードがオンだとほとんど意味を為さない。
が、 ryunosuke\dbml\Database::insert()ryunosuke\dbml\Database::update() などはそれ自体にそれなりの付随処理があるので、使うことに意味がないわけではない。

クエリビルダは疑問符プレースホルダが大量に埋め込まれる可能性があるので、全部パラメータにするのが大変。
ので、「prepare した時点で固定し、残り(名前付き)のみ後から指定する」という仕様になっている。

$qb = $db->select('t_table.*', [':id', 'opt1' => 1, 'opt2' => 2])->prepare();
// :id は解決していないため、パラメータで渡すことができる(下記はエミュレーションモードがオフなら『本当の』プリペアドステートメントで実行される)
$qb->array(['id' => 100]); // SELECT t_table.* FROM t_table WHERE id = 100 AND opt1 = 1 AND opt2 = 2
$qb->array(['id' => 101]); // SELECT t_table.* FROM t_table WHERE id = 101 AND opt1 = 1 AND opt2 = 2
$qb->array(['id' => 102]); // SELECT t_table.* FROM t_table WHERE id = 102 AND opt1 = 1 AND opt2 = 2

上記のように ":id" という形で「キー無しでかつ :から始まる要素」は利便性のため ['id = :id'] のように展開される。
普通の条件式では通常の値バインドと区別する必要があるので注意(['id > ?' => ':id'] だと WHERE id > ? = ":id" というただの文字列の WHERE になる)。

method ryunosuke\dbml\Query\Statement::__construct ($query, $params, $database) : void

method ryunosuke\dbml\Query\Statement::executeQuery ($params = [], $connection = null) : Doctrine\DBAL\Statement

取得系クエリとして実行する

method ryunosuke\dbml\Query\Statement::executeUpdate ($params = [], $connection = null) : Doctrine\DBAL\Statement

更新系クエリとして実行する

method ryunosuke\dbml\Query\Statement::getQuery () : string

クエリ文字列を返す

method ryunosuke\dbml\Query\Statement::getParams () : array

パラメータを返す

method ryunosuke\dbml\Query\Statement::merge (&$params) : string

パラメータをマージして文字列表現を返す

クエリ文字列を返し、引数配列にパラメータが追加される

interface ryunosuke\dbml\Query::Queryable

クエリ文字列(完全性は問わない。部分クエリでも良い)とパラメータを持つインターフェース

method ryunosuke\dbml\Query\Queryable::getQuery () : string

クエリ文字列を返す

method ryunosuke\dbml\Query\Queryable::getParams () : array

パラメータを返す

method ryunosuke\dbml\Query\Queryable::merge (&$params) : string

パラメータをマージして文字列表現を返す

クエリ文字列を返し、引数配列にパラメータが追加される

namespace ryunosuke\dbml\Transaction

class ryunosuke\dbml\Transaction::Transaction

トランザクションを表すクラス

メイン処理に加えて、

などの特徴がある。

リトライ

$retries を設定するとリトライ回数・間隔を指定することができる。
例えば retries([5000, 10000]) は「1回目のリトライは5秒後、2回めのリトライは10秒後」を意味する(つまりこの場合、最悪15秒かかる)。
指定形式の都合上、「無限リトライ」をすることはできない(実装を検討中。Generator を返すクロージャを与えるのが無難か?)

「リトライするか?」の判定は $retryable に「例外オブジェクトを受け取り真偽値を返す」クロージャを設定する。
例外発生時にそのクロージャが呼び出され、 true を返って来たらリトライ処理を行う。

イベント

イベント系メソッドは内部的には配列で保持され、保持している分が全て実行される。
例えば main(function(){}) はイベントの設定ではなく追加となる。
完全に置換するには main([function(){}]) のように配列で与える必要がある。

イベントはキーを持つ。このキーは追加/上書きの判定に使用したり、実行順を制御する。
main だけは特例で第2引数に前の返り値が渡ってチェーンされる(チェーンの最初は渡ってこない。つまり func_num_args などで判定可能)。

$tx = new Transaction($db);
$tx->main(function($db, $prev) {return $prev + 1;}, 2);     // A
$tx->main(function($db, $prev = 0) {return $prev + 1;}, 1); // B
$tx->main(function($db, $prev) {return $prev + 1;}, 3);     // C
$tx->perform(); // =3

上記はイベント名を指定して追加しているので、実行順は B -> A -> C となる。
かつチェーンを利用しているので、A , C にはその前段階の結果が第2引数で渡ってくる。
なお、イベント名は文字列でも良い。その場合の順番は SORT_REGULAR に従う。

イベントの種類は下記。

いくつかよくありそうなケースの呼び出しフローを下記に例として挙げる(ネストはトランザクションを表す)。

classconstant integer ryunosuke\dbml\Transaction\Transaction::READ_UNCOMMITTED

classconstant integer ryunosuke\dbml\Transaction\Transaction::READ_COMMITTED

classconstant integer ryunosuke\dbml\Transaction\Transaction::REPEATABLE_READ

classconstant integer ryunosuke\dbml\Transaction\Transaction::SERIALIZABLE

property int ryunosuke\dbml\Transaction::isolationLevel

トランザクション分離レベル

property Doctrine\DBAL\Logging\SQLLogger ryunosuke\dbml\Transaction::logger

ロガーインスタンス

property \Closure[] ryunosuke\dbml\Transaction::begin

begin イベント配列

property \Closure[] ryunosuke\dbml\Transaction::commit

commit イベント配列

property \Closure[] ryunosuke\dbml\Transaction::rollback

rollback イベント配列

property \Closure[] ryunosuke\dbml\Transaction::main

main イベント配列

property \Closure[] ryunosuke\dbml\Transaction::done

done イベント配列

property \Closure[] ryunosuke\dbml\Transaction::fail

fail イベント配列

property \Closure[] ryunosuke\dbml\Transaction::retry

retry イベント配列

property \Closure[] ryunosuke\dbml\Transaction::catch

catch イベント配列

property \Closure[] ryunosuke\dbml\Transaction::finish

finish イベント配列

property int[] ryunosuke\dbml\Transaction::retries

リトライ間隔

property \Closure ryunosuke\dbml\Transaction::retryable

リトライ判定処理

property bool ryunosuke\dbml\Transaction::savepointable

savepoint 有効/無効フラグ

method ryunosuke\dbml\Transaction\Transaction::getDefaultOptions () : array

オプションのデフォルト値を返す static メソッド

このメソッドの返り値が構成要素とデフォルト値を担っていて、その配列以外のキーは基本的に保持できない。

method ryunosuke\dbml\Transaction\Transaction::__construct ($database, $options = []) : void

コンストラクタ

method ryunosuke\dbml\Transaction\Transaction::__get ($name) : void

method ryunosuke\dbml\Transaction\Transaction::__set ($name, $value) : void

method ryunosuke\dbml\Transaction\Transaction::__call ($name, $arguments) : void

method ryunosuke\dbml\Transaction\Transaction::__invoke ($throwable) : void

method ryunosuke\dbml\Transaction\Transaction::begin ($callback, $key = null) : ryunosuke\dbml\Transaction\Transaction

begin イベントを設定する

method ryunosuke\dbml\Transaction::setBegin ($closure) : ryunosuke\dbml\Transaction\Transaction

begin イベント配列を設定する

method ryunosuke\dbml\Transaction::getBegin () : \Closure[]

begin イベント配列を取得する

method ryunosuke\dbml\Transaction\Transaction::commit ($callback, $key = null) : ryunosuke\dbml\Transaction\Transaction

commit イベントを設定する

method ryunosuke\dbml\Transaction::setCommit ($closure) : ryunosuke\dbml\Transaction\Transaction

commit イベント配列を設定する

method ryunosuke\dbml\Transaction::getCommit () : \Closure[]

commit イベント配列を取得する

method ryunosuke\dbml\Transaction\Transaction::rollback ($callback, $key = null) : ryunosuke\dbml\Transaction\Transaction

rollback イベントを設定する

method ryunosuke\dbml\Transaction::setRollback ($closure) : ryunosuke\dbml\Transaction\Transaction

rollback イベント配列を設定する

method ryunosuke\dbml\Transaction::getRollback () : \Closure[]

rollback イベント配列を取得する

method ryunosuke\dbml\Transaction\Transaction::main ($callback, $key = null) : ryunosuke\dbml\Transaction\Transaction

main イベントを設定する

method ryunosuke\dbml\Transaction::setMain ($closure) : ryunosuke\dbml\Transaction\Transaction

main イベント配列を設定する

method ryunosuke\dbml\Transaction::getMain () : \Closure[]

main イベント配列を取得する

method ryunosuke\dbml\Transaction\Transaction::done ($callback, $key = null) : ryunosuke\dbml\Transaction\Transaction

done イベントを設定する

method ryunosuke\dbml\Transaction::setDone ($closure) : ryunosuke\dbml\Transaction\Transaction

done イベント配列を設定する

method ryunosuke\dbml\Transaction::getDone () : \Closure[]

done イベント配列を取得する

method ryunosuke\dbml\Transaction\Transaction::fail ($callback, $key = null) : ryunosuke\dbml\Transaction\Transaction

fail イベントを設定する

method ryunosuke\dbml\Transaction::setFail ($closure) : ryunosuke\dbml\Transaction\Transaction

fail イベント配列を設定する

method ryunosuke\dbml\Transaction::getFail () : \Closure[]

fail イベント配列を取得する

method ryunosuke\dbml\Transaction\Transaction::retry ($callback, $key = null) : ryunosuke\dbml\Transaction\Transaction

retry イベントを設定する

method ryunosuke\dbml\Transaction::setRetry ($closure) : ryunosuke\dbml\Transaction\Transaction

retry イベント配列を設定する

method ryunosuke\dbml\Transaction::getRetry () : \Closure[]

retry イベント配列を取得する

method ryunosuke\dbml\Transaction\Transaction::catch ($callback, $key = null) : ryunosuke\dbml\Transaction\Transaction

catch イベントを設定する

method ryunosuke\dbml\Transaction::setCatch ($closure) : ryunosuke\dbml\Transaction\Transaction

catch イベント配列を設定する

method ryunosuke\dbml\Transaction::getCatch () : \Closure[]

catch イベント配列を取得する

method ryunosuke\dbml\Transaction\Transaction::finish ($callback, $key = null) : ryunosuke\dbml\Transaction\Transaction

finish イベントを設定する

method ryunosuke\dbml\Transaction::setFinish ($closure) : ryunosuke\dbml\Transaction\Transaction

finish イベント配列を設定する

method ryunosuke\dbml\Transaction::getFinish () : \Closure[]

finish イベント配列を取得する

method ryunosuke\dbml\Transaction\Transaction::master () : ryunosuke\dbml\Transaction\Transaction

トランザクションをマスター接続で実行するようにする

method ryunosuke\dbml\Transaction\Transaction::slave () : ryunosuke\dbml\Transaction\Transaction

トランザクションをスレーブ接続で実行するようにする

method ryunosuke\dbml\Transaction\Transaction::perform ($throwable = true) : mixed

トランザクションとして実行する

$throwable は catch で代替可能なので近い将来削除される。

method ryunosuke\dbml\Transaction\Transaction::preview (&$queries = []) : mixed

トランザクションとして実行後、強制的に rollback する

一連の実行クエリが得られるが、あくまでDBレイヤーのトランザクションなので、 php的にファイルを変更したり、何かを送信したりしてもそれは戻らない。

method ryunosuke\dbml\Transaction::isolationLevel ($int = null) : ryunosuke\dbml\Transaction\Transactionint

トランザクション分離レベルを設定・取得する

method ryunosuke\dbml\Transaction::getIsolationLevel () : int

トランザクション分離レベルを取得する

method ryunosuke\dbml\Transaction::setIsolationLevel ($int) : ryunosuke\dbml\Transaction\Transaction

トランザクション分離レベルを設定する

method ryunosuke\dbml\Transaction::logger ($logger = null) : ryunosuke\dbml\Transaction\Transactionint

ロガーインスタンスを設定・取得する

method ryunosuke\dbml\Transaction::getLogger () : Doctrine\DBAL\Logging\SQLLogger

ロガーインスタンスを取得する

method ryunosuke\dbml\Transaction::setLogger ($logger) : ryunosuke\dbml\Transaction\Transaction

ロガーインスタンスを設定する

method ryunosuke\dbml\Transaction::retries ($ints = null) : ryunosuke\dbml\Transaction\Transactionint[]

リトライ間隔を設定・取得する

method ryunosuke\dbml\Transaction::getRetries () : int[]

リトライ間隔を取得する

method ryunosuke\dbml\Transaction::setRetries ($ints) : ryunosuke\dbml\Transaction\Transaction

リトライ間隔を設定する

method ryunosuke\dbml\Transaction::retryable ($closure = null) : ryunosuke\dbml\Transaction\Transaction\Closure

リトライ判定処理を設定・取得する

method ryunosuke\dbml\Transaction::getRetryable () : \Closure

リトライ判定処理を取得する

method ryunosuke\dbml\Transaction::setRetryable ($closure) : ryunosuke\dbml\Transaction\Transaction

リトライ判定処理を設定する

method ryunosuke\dbml\Transaction::savepointable ($bool = null) : ryunosuke\dbml\Transaction\Transactionbool

savepoint 有効/無効フラグを設定・取得する

method ryunosuke\dbml\Transaction::getSavepointable () : bool

savepoint 有効/無効フラグを取得する

method ryunosuke\dbml\Transaction::setSavepointable ($bool) : ryunosuke\dbml\Transaction\Transaction

savepoint 有効/無効フラグを設定する

class ryunosuke\dbml\Transaction::Logger

スタンダードな SQL ロガー

Database の logger オプションにこのインスタンスを渡すとクエリがログられるようになる。

# 標準出力にログる
$db = new Database($connection, [
    'logger' => new Logger([
        'destination' => STDOUT
    ]),
]);
# /var/log/query.log にログる
$db = new Database($connection, [
    'logger' => new Logger([
        'destination' => '/var/log/query.log'
    ]),
]);
# クロージャでログる
$db = new Database($connection, [
    'logger' => new Logger([
        'destination' => function ($log) { echo $log; }
    ]),
]);

Transaction 名前空間に居るのは少し小細工をしているから(癒着している)+「クエリログは膨大なのでログらない(RDBMS のログに任せる)がトランザクションログはアプリで取っておきたい」という要件が多いため。
別にグローバルなロガーとして設定しても問題はない。

buffer オプションについて

コンストラクタオプションで buffer を渡すと下記のような動作モードになる。
fastcgi_finish_request など、クライアントに速度を意識させない方法があるなら基本的には true を推奨する。
BLOB INSERT が多いとか、軽めのクエリの数が多いとか、要件に応じて適時変更したほうが良い。

int

指定されたサイズでバッファリングして終了時に書き込む(超えた分は一時ファイル書き出し)。

メモリには優しいが、逐次ログの変換処理が発生するため、場合によっては動作速度があまりよろしくない。
終了時にロックして書き込むのでログがリクエスト単位になる(別リクエストの割り込みログが発生しない)。

true

配列に溜め込んで終了時に書き込む。

ログの変換処理が逐次行われず、終了時に変換と書き込みを行うので、 fastcgi_finish_request があるなら(クライアントの)動作速度に一切の影響を与えない。
ただし、 長大なクエリや BLOB INSERT などもすべて蓄えるのでメモリには優しくない。
終了時にロックして書き込むのでログがリクエスト単位になる(別リクエストの割り込みログが発生しない)。

false

逐次書き込む。

逐次変換処理は行われるがメモリは一切消費しないし、ロックも伴わない。
ただし、逐次書き込むのでログがリクエスト単位にならない(別リクエストの割り込みログが発生する)。

method ryunosuke\dbml\Transaction\Logger::getDefaultOptions () : array

オプションのデフォルト値を返す static メソッド

このメソッドの返り値が構成要素とデフォルト値を担っていて、その配列以外のキーは基本的に保持できない。

method ryunosuke\dbml\Transaction\Logger::simple ($trimsize = null) : \Closure

シンプルに値の埋め込みだけを行うコールバックを返す

method ryunosuke\dbml\Transaction\Logger::pretty ($trimsize = null) : \Closure

値を埋め込んだ上で sql フォーマットするコールバックを返す

method ryunosuke\dbml\Transaction\Logger::oneline ($trimsize = null) : \Closure

連続する空白をまとめて1行化するコールバックを返す

method ryunosuke\dbml\Transaction\Logger::__construct ($destination = null, $options = []) : void

コンストラクタ

method ryunosuke\dbml\Transaction\Logger::__destruct () : void

デストラクタのデフォルト実装

デストラクタはコンストラクタに比べてそれほど実装されないので trait 側で定義してしまって良いと判断。
use 側でデストラクタを定義したい場合は OptionTrait__destruct を呼ぶようにすること。

method ryunosuke\dbml\Transaction\Logger::log ($sql, $params = [], $types = []) : void

method ryunosuke\dbml\Transaction\Logger::startQuery ($sql, $params = null, $types = null) : void

Logs a SQL statement somewhere.

method ryunosuke\dbml\Transaction\Logger::stopQuery () : void

Marks the last started query as stopped. This can be used for timing of queries.

class ryunosuke\dbml::Database

データベースそのものを表すクラス

すべての根幹となり、基本的に利用側はこのクラスのインスタンスしか利用しない(のが望ましい)。

インスタンス作成

# シングル環境
$dbconfig = [
    'driver'   => 'pdo_mysql',
    'host'     => '127.0.0.1',
    'port'     => '3306',
    'dbname'   => 'dbname',
    'user'     => 'user',
    'password' => 'password',
    'charset'  => 'utf8',
];
$db = new \ryunosuke\dbml\Database($dbconfig, []);

# レプリケーション環境
$dbconfig = [
    'driver'   => 'pdo_mysql',
    'host'     => ['master_host', 'slave_host'],
    'port'     => '3306',
    'dbname'   => 'dbname',
    'user'     => 'user',
    'password' => ['master_password', 'slave_password'],
    'charset'  => 'utf8',
];
$db = new \ryunosuke\dbml\Database($dbconfig, []);

このようにして作成する。要するにコンストラクタの引数に \Doctrine\DBAL\DriverManager::getConnection と同じ配列を渡す。
要素を配列にした場合はそれぞれ個別の指定として扱われる。

詳細はコンストラクタを参照

コネクション(マスター/スレーブ)

上記のようにマスター/スレーブ構成用に接続を分けることができる。
マスターは更新系クエリ、スレーブは参照系クエリという風に自動で使い分けられる。
またトランザクション系(begin, commit, rollback)はマスター側で実行される(一応引数で分けることができる)。

マスター/スレーブモードは可能な限りマスターへ負荷をかけないような設計になっている。
つまり、テーブル定義の describe やデータベースバージョンの取得などは全てスレーブで行われ、マスターへは接続しない。
理想的な状況の場合(更新系クエリが一切ない場合)、マスターへは接続すらしない。
ただし、その弊害としてマスター・スレーブは完全に同じ RDBMS である必要がある。また、スキーマ情報に差異があると予想外の動きをする可能性がある。

補助メソッド

いくつかのメソッドは特定のサフィックスを付けることで異なる挙動を示すようになる。
内部処理が黒魔術的なので、呼ぼうとすると無理やり呼べたりするが、基本的にコード補完に出ないメソッドは使用しないこと(テストしてないから)。

InShare/ForUpdate

取得系メソッドに付与できる。
InShare を付与すると SELECT クエリに共有ロック構文が付与される(mysql なら LOCK IN SHARE MODE)。
ForUpdate を付与すると SELECT クエリに排他ロック構文が付与される(mysql なら FOR UPDATE)。

OrThrow

通常の更新系/取得系メソッドに付与できる。
作用行がなかったときに例外を投げたり、返り値として主キー配列を返すようになる。
これらの orThrow 系メソッドにより、「(詳細画面などで)行が見つからなかったら」「(何らかの原因により)行が insert されなかったら」の戻り値チェックを省くことができ、シンプルなコードを書くことができる。

メソッド説明
insert などの行追加系affected row が 0 の時に例外を投げる。更に戻り値として主キー配列を返す
update, delete などの行作用系affected row が 0 の時に例外を投げる。更に戻り値として可能な限り主キー配列を返す(後述)
upsert などの行置換系affected row が 0 の時に例外を投げる。更に戻り値として追加/更新した行の主キー配列を返す(ryunosuke\dbml\Database::upsert()参照)
fetchArray, fetchLists などの複数行を返す系フェッチ行数が 0 の時に例外を投げる
fetchTuple などの単一行を返す系行が見つからなかった時に例外を投げる
fetchValue などのスカラー値を返す系行が見つからなかった時に例外を投げる。 PostgreSQL の場合やカラムキャストが有効な場合は注意

mysql の UPDATE は条件が一致しても値が変わらなければ affected rows として 0 を返すので OrThrow すると正常動作なのに例外を投げる、という事象が発生する。
この動作が望ましくない場合は PDO::MYSQL_ATTR_FOUND_ROWS = true を使用する。

[update/delete]OrThrow の戻り値は主キーだが、複数行に作用した場合は未定義となる(['id' => 3] で update/delete した場合は 3 を返せるが、['create_at < ?' => '2011-12-34'] といった場合は返しようがないため)。
そもそも「更新/削除できなかったら例外」という挙動が必要なケースはほぼ無いためこれらの用途はほとんどなく、単に他のメソッドとの統一のために存在している。

Ignore

[insert, updert, modify, delete, remove, destroy] メソッドのみに付与できる。
RDBMS に動作は異なるが、 INSERT IGNORE のようなクエリが発行される。

Conditionally

[insert, upsert, modify] メソッドのみに付与できる。
条件付き insert となり、「insert された場合にその主キー」を「されなかった場合に空配列」を返す。
最も多いユースケースとしては「行がないなら insert」だろう。

エスケープ

識別子のエスケープは一切面倒をみない。外部入力を識別子にしたい(テーブル・カラムを外部指定するとか)場合は自前でエスケープすること。
値のエスケープに関しては基本的には安全側に倒しているが、 ryunosuke\dbml\Query\Expression\Expression を使用する場合はその前提が崩れる事がある( () を含むエントリは自動で Expression 化されるので同じ)。
原則的に外部入力を Expression 化したり、値以外の入力として使用するのは全く推奨できない。

classconstant string ryunosuke\dbml\Database::AUTO_KEY

classconstant string ryunosuke\dbml\Database::AUTO_PRIMARY_KEY

classconstant string ryunosuke\dbml\Database::AUTO_PARENT_KEY

classconstant string ryunosuke\dbml\Database::AUTO_CHILD_KEY

classconstant string ryunosuke\dbml\Database::AUTO_DEPEND_KEY

classconstant string ryunosuke\dbml\Database::METHOD_ARRAY

classconstant string ryunosuke\dbml\Database::METHOD_ASSOC

classconstant string ryunosuke\dbml\Database::METHOD_LISTS

classconstant string ryunosuke\dbml\Database::METHOD_PAIRS

classconstant string ryunosuke\dbml\Database::METHOD_TUPLE

classconstant string ryunosuke\dbml\Database::METHOD_VALUE

classconstant array ryunosuke\dbml\Database::METHODS

classconstant array ryunosuke\dbml\Database::JOIN_MAPPER

JOIN 記号のマッピング

method ryunosuke\dbml\Database::getDefaultOptions () : array

オプションのデフォルト値を返す static メソッド

このメソッドの返り値が構成要素とデフォルト値を担っていて、その配列以外のキーは基本的に保持できない。

method ryunosuke\dbml\Database::__construct ($dbconfig, $options = []) : void

コンストラクタ

設定配列 or \Doctrine\DBAL\Connection を与えてインスタンスを生成する。
設定配列は \Doctrine\DBAL\DriverManager::getConnection に与える配列に準拠するが、いずれかの要素を配列にすると 0 がマスター、1 がスレーブとなる。
コネクションは配列で与えることができる。配列を与えた場合、 0 がマスター、1 がスレーブとなる。

基本的には配列を推奨する。コネクション指定は手元に \Doctrine\DBAL\Connection のインスタンスがあるなど、いかんともしがたい場合に使用する。

設定配列はドライバによって異なるが、 mysql で例を挙げると下記。

# mysql のよくありそうな例
$db = new Database([
    'driver'        => 'pdo_mysql',
    'host'          => '127.0.0.1',
    'port'          => 3306,
    'user'          => 'username',
    'password'      => 'password',
    'dbname'        => 'test_dbml',
    'charset'       => 'utf8',
    'driverOptions' => [
        \PDO::ATTR_EMULATE_PREPARES  => false,
        \PDO::ATTR_STRINGIFY_FETCHES => false,
    ],
]);

いくつかのパターンを混じえた指定例は下記。

# 単純な配列を与えた場合(単一コネクション)
$db = new Database([
    'driver' => 'pdo_mysql',
    'host'   => '127.0.0.1',
    'port'   => 3306,
    'dbname' => 'example',
]);
// mysql://127.0.0.1:3306/example の単一コネクションが生成される

# 設定配列のいずれかの要素が配列の場合(マスター/スレーブ構成)
$db = new Database([
    'driver' => 'pdo_mysql',
    'host'   => ['127.0.0.1', '127.0.0.2'],
    'port'   => [3306, 3307],
    'dbname' => 'example',
]);
// 下記の2コネクションが生成される(つまり、配列で複数指定したものは個別指定が活き、していないものは共通として扱われる)
// - master: mysql://127.0.0.1:3306/example
// - slave:  mysql://127.0.0.2:3307/example

# コネクションを与える場合
$db = new Database($connection);
// 単一コネクションが使用される

$db = new Database([$connection1, $connection2]);
// $connection1 がマスター、$connection2 がスレーブとして使用される

第2引数のオプションは getDefaultOptions で与えるものを指定する。
基本的には未指定でもそれなりに動作するが、 cacheProvider だけは明示的に与えたほうが良い。

さらに、このクラスのオプションは少し特殊で、 ryunosuke\dbml\Query\QueryBuilderryunosuke\dbml\Gateway\TableGateway のオプションも複合で与えることができる。
その場合、そのクラスのインスタンスが生成されたときのデフォルト値として作用する。

# autoOrder は本来 QueryBuilder のオプションだが、 Database のオプションとしても与えることができる
$db = new Database($dbconfig, [
    'autoOrder' => false,
]);
$db->selectArray('tablename'); // 上記で false を設定してるので自動で `ORDER BY 主キー` は付かない

つまり実質的には「本ライブラリの設定が全て可能」となる。あまり「この設定はどこのクラスに係るのか?」は気にしなくて良い。

method ryunosuke\dbml\Database::__isset ($name) : bool

ゲートウェイオブジェクトがあるかを返す

method ryunosuke\dbml\Database::__unset ($name) : void

ゲートウェイオブジェクトを伏せる

method ryunosuke\dbml\Database::__get ($name) : ryunosuke\dbml\Gateway\TableGateway

ゲートウェイオブジェクトを返す

テーブル名 or (設定されているなら)エンティティ名で ryunosuke\dbml\Gateway\TableGateway を取得する。

# t_article の全レコードを取得する
$db->t_article->array();

method ryunosuke\dbml\Database::__set ($name, $value) : void

サポートされない

将来のために予約されており、呼ぶと無条件で例外を投げる。

phpstorm が $db->tablename[1]['title'] = 'hoge'; のような式で警告を出すのでそれを抑止する目的もある。

method ryunosuke\dbml\Database::__debugInfo () : array

__debugInfo

いろいろ統括していて情報量が多すぎるので出力を絞る。

method ryunosuke\dbml\Database::describe ($objectname = null) : Doctrine\DBAL\Schema\AbstractAsset

スキーマオブジェクトを返す

「スキーマオブジェクト」とは \Doctrine\DBAL\Schema\Schema だけのことではなく、一般的な「スキーマオブジェクト」を表す。
(もっとも、それらのオブジェクトを返すので言うなれば「スキーマオブジェクトオブジェクト」か)。

返し得るオブジェクトは5種類。下記のサンプルを参照。

# \Doctrine\DBAL\Schema\Schema を返す
$schema = $db->describe(); // 引数省略時は Schema オブジェクト

# \Doctrine\DBAL\Schema\Table を返す
$table = $db->describe('tablename'); // テーブル名を与えると Table オブジェクト
$view = $db->describe('viewname'); // ビュー名を与えても Table オブジェクト

# \Doctrine\DBAL\Schema\ForeignKeyConstraint を返す
$fkey = $db->describe('fkeyname'); // 外部キー名を与えると ForeignKeyConstraint オブジェクト

# \Doctrine\DBAL\Schema\Column を返す
$column = $db->describe('tablename.columnname'); // テーブル名.カラム名を与えると Column オブジェクト

# \Doctrine\DBAL\Schema\Index を返す
$index = $db->describe('tablename.indexname'); // テーブル名.インデックス名を与えると Index オブジェクト

オブジェクト名が競合している場合は何が返ってくるか未定義。

method ryunosuke\dbml\Database::getAnnotation ($ignore = []) : string

コード補完用のアノテーションコメントを取得する

存在するテーブル名や tableMapper を利用してアノテーションコメントを作成する。
このメソッドで得られたコメントを基底クラスなどに貼り付ければ補完が効くようになる。

method ryunosuke\dbml\Database::echoAnnotation ($namespace = null, $filename = null) : string

コード補完用のアノテーショントレイトを取得する

存在するテーブル名や tableMapper などを利用して mixin 用のトレイトを作成する。
このメソッドが吐き出したトレイトを @ mixin Hogera などとすると補完が効くようになる。

method ryunosuke\dbml\Database::setLogger ($logger) : ryunosuke\dbml\Database

ロガーを設定する

配列で 0, master を指定するとマスター接続に設定される。
同様に 1, slave を指定するとスレーブ接続に設定される。

単一のインスタンスを渡した場合は両方に設定される。

method ryunosuke\dbml\Database::setAutoCastType ($array) : ryunosuke\dbml\Database

カラムの型に応じた自動変換処理を登録する

自動変換がなにかは dbml を参照。

$db->setAutoCastType([
    // DATETIME 型は「取得時は変換」「更新時はそのまま」となるように設定
    Type::DATETIME => [
        'select' => true,
        'affect' => false,
    ],
    // SARRAY 型は「取得時も更新時も変換」となるように設定(単一 bool を与えると select,affect の両方を意味する)
    Type::SIMPLE_ARRAY => true,
    // STRING 型はクロージャで変換する
    Type::String => [
        'select' => function ($colval) {
            // $colval に SELECT 時の値が渡ってくる
        },
        'affect' => function ($colval) {
            // $colval に AFFECT 時の値が渡ってくる
        },
    ],
]);

method ryunosuke\dbml\Database::setConnection ($connection) : ryunosuke\dbml\Database

接続(Connection)を強制的に設定する

マスター/スレーブの切り替えにも使用する(bool 値を与えると切り替えとなる)。

// 接続をマスターに切り替える
$db->setConnection(true);
// 接続をスレーブに切り替える
$db->setConnection(false);
// 全く別個のコネクションに切り替える
$db->setConnection($connection);

method ryunosuke\dbml\Database::getConnection () : Doctrine\DBAL\Connection

現在のトランザクション接続(Connection)を返す

トランザクション接続とは基本的に「マスター接続」を指す。
シングルコネクション環境なら気にしなくて良い。

method ryunosuke\dbml\Database::getMasterConnection () : Doctrine\DBAL\Connection

マスター接続(Connection)を返す

method ryunosuke\dbml\Database::getSlaveConnection () : Doctrine\DBAL\Connection

スレーブ接続(Connection)を返す

method ryunosuke\dbml\Database::getConnections () : Doctrine\DBAL\Connection[]

コネクション配列を返す

単一だろうと Master/Slave 構成だろうとインスタンスとしての配列を返す。
例えばマスタースレーブが同じインスタンスの場合は1つしか返さない。

method ryunosuke\dbml\Database::getPdo () : \PDO

トランザクション接続の PDO を返す

トランザクション接続とは基本的に「マスター接続」を指す。
シングルコネクション環境なら気にしなくて良い。

method ryunosuke\dbml\Database::getMasterPdo () : \PDO

マスター接続の PDO を返す

method ryunosuke\dbml\Database::getSlavePdo () : \PDO

スレーブ接続の PDO を返す

method ryunosuke\dbml\Database::setPdoAttribute ($attributes, $target = null) : \Closure

PDO の属性を変更する

返り値として「元に戻すためのクロージャ」を返す。
この返り値をコールすれば変更した属性を元に戻すことができる。

属性によってはコンストラクタでしか受け付けてくれないものがあるので注意。

# 一時的に PDO のエラーモードを SILENT にする
$restore = $db->setPdoAttribute([\PDO::ATTR_ERRMODE => \PDO::ERRMODE_SILENT]);

# 返り値のクロージャを呼ぶと元に戻る
$restore();

method ryunosuke\dbml\Database::getPlatform () : Doctrine\DBAL\Platforms\AbstractPlatform

dbal のプラットフォームを取得する

method ryunosuke\dbml\Database::getCompatiblePlatform () : ryunosuke\dbml\Metadata\CompatiblePlatform

互換用プラットフォームを取得する

method ryunosuke\dbml\Database::getSchema () : ryunosuke\dbml\Metadata\Schema

スキーマオブジェクトを取得する

method ryunosuke\dbml\Database::getEntityClass ($tablename) : stringfalse

テーブル名からエンティティクラス名を取得する

method ryunosuke\dbml\Database::getGatewayClass ($tablename) : string

テーブル名からゲートウェイクラス名を取得する

method ryunosuke\dbml\Database::convertTableName ($entityname) : string

エンティティ名からテーブル名へ変換する

method ryunosuke\dbml\Database::convertEntityName ($tablename) : string

テーブル名からエンティティ名へ変換する

複数のマッピングがあるときは最初の名前を返す。

method ryunosuke\dbml\Database::overrideColumns ($definition) : ryunosuke\dbml\Database

仮想カラムを追加する

ここで追加したカラムはあたかもテーブルにあるかのように select, where することができる。
仮想カラムは TableDescripter で使える記法すべてを使うことができる。

# 仮想カラムを追加する
$db->overrideColumns([
    'table_name' => [
        // 単純なエイリアス。ほぼ意味はない
        'hoge'      => 'fuga',
        // 姓・名を結合してフルネームとする(php 版)
        'fullname1' => function($row) { return $v['sei'] . $v['mei']; },
        // 姓・名の SQL 版
        'fullname2' => 'CONCAT(sei, mei)',
        // 姓・名の SQL 版(修飾子)
        'fullname3' => 'CONCAT(%1$s.sei, %1$s.mei)',
        // 上記の例は実は簡易指定で本来は下記の配列を渡す(非配列を渡すと下記でいう expression が渡されたとみなす)
        'misc'      => [
            'expression' => null,  // 仮想カラムの実定義(文字列や Expression やクエリビルダなど全て使用できる)
            'type'       => null,  // 仮想カラムの型
            'implicit'   => false, // !column などの一括取得に含めるか
        ],
        // null を渡すと仮想カラムの削除になる
        'deletedVcolumn' => null,
    ],
]);

# 追加した仮想カラムをあたかもテーブルカラムのように使用できる
$db->selectArray('table_name' => [
    'hoge',
    'fullname1', // php 的に文字列結合($v['sei'] . $v['mei'])する
    'fullname2', // SQL 的に文字列結合(CONCAT(sei, mei))する
    'fullname3', // 修飾子付きで SQL 的に文字列結合(CONCAT(AAA.sei, AAA.mei))する
    // さらにエイリアスも使用できる
    'fullalias' => 'fullname1',
]);

'fullname3' について補足すると、 expression が文字列であるとき、その実値は sprintf($expression, 修飾子) となる。
仮想カラムはあらゆる箇所で使い回される想定なので、「その時のテーブル名・エイリアス(修飾子)」を決めることができない。
かと言って修飾子を付けないと曖昧なカラムエラーが出ることがある。
%1$s しておけば sprintf で「現在の修飾子」が埋め込まれるためある程度汎用的にできる。
ただし、その弊害として素の % を使うときは %% のようにエスケープする必要があるので注意。

また、仮想といいつつも厳密には実際に定義されているカラムも指定可能。
これを利用するとカラムのメタ情報を上書きすることができる。

# 仮想ではなく実カラムを指定
$db->overrideColumns([
    'table_name' => [
        'checkd_option'      => [
            // checkd_option という実際に存在するカラムの型を simple_array に上書きできる
            'type'     => Type::getType('simple_array'),
            // カラムオプションを変更できる
            'anywhere' => [],
        ],
    ],
]);

なお、実際のデータベース上の型が変わるわけではない。あくまで「php が思い込んでいる型」の上書きである。
php 側の型が活用される箇所はそう多くないが、例えば下記のような処理では上書きすると有用なことがある。

method ryunosuke\dbml\Database::addRelation ($relations) : array

外部キーをまとめて追加する

addForeignKey を複数呼ぶのとほぼ等しいが、遅延実行されて必要になったときに追加される。

# 下記のような配列を与える
$db->addRelation([
    'ローカルテーブル名' => [
        '外部テーブル名' => [
            '外部キー名' => [
                'ローカルカラム名1' => '外部カラム名1',
                'ローカルカラム名2' => '外部カラム名2',
            ],
            // 別キー名に対して上記の構造の繰り返しができる
        ],
        // 別外部テーブル名に対して上記の構造の繰り返しができる
    ],
    // 別ローカルテーブル名に対して上記の構造の繰り返しができる
]);

method ryunosuke\dbml\Database::addForeignKey ($localTable, $foreignTable, $columnsMap, $fkname = null) : Doctrine\DBAL\Schema\ForeignKeyConstraint

外部キーを追加する

簡易性や ForeignKeyConstraint を隠蔽するために用意されている。
ForeignKeyConstraint 指定で追加する場合は ryunosuke\dbml\Metadata\Schema::addForeignKey() を呼ぶ。

method ryunosuke\dbml\Database::ignoreForeignKey ($localTable, $foreignTable, $columnsMap) : Doctrine\DBAL\Schema\ForeignKeyConstraint

外部キーを無効にする

簡易性や ForeignKeyConstraint を隠蔽するために用意されている。
ForeignKeyConstraint 指定で無効にする場合は ryunosuke\dbml\Metadata\Schema::ignoreForeignKey() を呼ぶ。

method ryunosuke\dbml\Database::begin () : int

begin

Doctrine\DBAL\Connection::beginTransaction() の移譲。

method ryunosuke\dbml\Database::commit () : int

commit

Doctrine\DBAL\Connection::commit() の移譲。

method ryunosuke\dbml\Database::rollback () : int

rollback

Doctrine\DBAL\Connection::rollBack() の移譲。

method ryunosuke\dbml\Database::transact ($main, $catch = null, $options = [], $throwable = true) : mixed

コールバックをトランザクションブロックで実行する

$options は ryunosuke\dbml\Transaction\Transaction を参照。

$throwable は catch で代替可能なので近い将来削除される。

// このクロージャ内の処理はトランザクション内で処理される
$return = $db->transact(function ($db) {
    return $db->insertOrThrow('t_table', ['data array']);
});

method ryunosuke\dbml\Database::transaction ($main = null, $catch = null, $options = []) : ryunosuke\dbml\Transaction\Transaction

トランザクションオブジェクトを返す

$options は ryunosuke\dbml\Transaction\Transaction を参照。

method ryunosuke\dbml\Database::preview ($main, $options = null) : array

トランザクションをプレビューする(実行クエリを返す)

$options は ryunosuke\dbml\Transaction\Transaction を参照。

この処理は「実際にクエリを投げてロールバックしてログを取る」という機構で実装されている。
つまり、トランザクション未対応の RDBMS だと実際にクエリが実行されるし、RDBMS 管轄外の事を行っても無かったことにはならない。
RDBMS によっては連番が飛ぶかもしれない。

あくまで、開発のサポート(「このメソッドを呼ぶとどうなるんだろう/どういうクエリが投げられるんだろう」など)に留めるべきである。

// $logs に実際に投げたクエリが格納される。
$logs = $db->preview(function ($db) {
    $pk = $db->insertOrThrow('t_table', ['data array']);
    $db->update('t_table', ['data array'], $pk);
});

method ryunosuke\dbml\Database::raw ($expr, $params = []) : ryunosuke\dbml\Query\Expression\Expression

new ryunosuke\dbml\Query\Expression\Expression するだけのメソッド

可能なら直接 new Expression せずにこのメソッド経由で生成したほうが良い(MUST ではない)。

method ryunosuke\dbml\Database::operator ($cond, $params = []) : ryunosuke\dbml\Query\Expression\Expression

引数内では AND、引数間では OR する Expression を返す

得られる結果としては ryunosuke\dbml\Query\QueryBuilder::where()とほぼ同じ。
ただし、あちらはクエリビルダで WHERE 専用であるのに対し、こちらは Expression を返すだけなので SELECT 句に埋め込むことができる。

$db->select([
    't_article' => [
        'contain_hoge' => $db->operator('article_title:%LIKE%', 'hoge'),
    ],
]);
// SELECT (article_title LIKE ?) AS contain_hoge FROM t_article: ['%hoge%']

$db->select([
    't_article' => [
        'contain_misc' => $db->operator([
            'colA' => 1,
            'colB' => 2,
        ], [
            'colC' => 3,
            'colD' => 4,
            [
                'colE1' => 5,
                'colE2' => 6,
            ]
        ]),
    ],
]);
// SELECT (((colA = ?) AND (colB = ?)) OR ((colC = ?) AND (colD = ?) AND ((colE1 = ?) OR (colE2 = ?)))) AS contain_misc FROM t_article: [1, 2, 3, 4, 5, 6]

method ryunosuke\dbml\Database::binder () : callable\ArrayObject

値を保持しつつプレースホルダーを返すオブジェクトを返す

$binder = $db->binder();
// このようにすると値を保持しつつプレースホルダー文字列を返す
$sql = "SELECT * FROM t_table WHERE id IN ({$binder([1, 2, 3])}) AND status = {$binder(1)}";
// $binder はそのままパラメータとして使える
$db->fetchAll($sql, $binder);
// prepare: SELECT * FROM t_table WHERE id IN (?, ?, ?) AND status = ?
// execute: SELECT * FROM t_table WHERE id IN (1, 2, 3) AND status = 1

method ryunosuke\dbml\Database::quote ($value, $type = null) : stringnull

値をクオートする

null を quote すると '' ではなく NULL になる。
bool を quote すると文字ではなく int になる。

それ以外は Doctrine\DBAL\Connection::quote() と同じ。

method ryunosuke\dbml\Database::quoteIdentifier ($identifier) : string

識別子をクオートする

Doctrine\DBAL\Connection::quoteIdentifier() を参照。

method ryunosuke\dbml\Database::queryInto ($sql, $params = []) : string

SQL とパラメータを指定してクエリを構築する

# 素の文字列
$db->queryInto('SELECT ?', ['xxx']);
// SELECT 'xxx'

# Expression を与えると保持しているパラメータが使用される
$db->queryInto(new Expression('UPPER(?)', ['yyy']));
// UPPER('yyy')

# Expression というか Queryable 全般がそうなる
$db->queryInto($db->select('tablename', ['id' => 1]));
// (SELECT tablename.* FROM tablename WHERE id = '1')

method ryunosuke\dbml\Database::bindInto ($data, &$params) : mixed

? 込みのキー名を正規化する

具体的には引数 $params に bind 値を格納して返り値として(? を含んだ)クエリ文字列を返す。

# 単純に文字列で渡す(あまり用途はない)
$db->bindInto('col', $params);
// results: "?", $params: ['col']

# Queryable も渡せる
$db->bindInto(new Expression('col', [1]), $params);
// results: ['col1'], $params: [1]

# 配列で渡す(混在可能。メイン用途)
$db->bindInto(['col1' => new Expression('UPPER(?)', [1]), 'col2' => 2], $params);
// results: ['col1' => 'UPPER(?)', 'col2' => '?'], $params: [1, 2]

method ryunosuke\dbml\Database::whereInto ($identifier, &$params, $andor = "OR", &$filterd = null) : array

where を正規化する

基本的に配列を与えることが多いが、値はエスケープされるがキーは一切触らずスルーされるためキーには決してユーザ由来の値を渡してはならない
また、トップレベル以下の下層に配列が来ても連想配列とはみなされない(キーを使用しない or 連番で振り直す)。

# bad(トップレベルのキーにユーザ入力が渡ってしまう)
$db->whereInto($_GET);

# better(少なくともトップレベルのキーにユーザ入力が渡ることはない)
$db->whereInto([
    'colA' => $_GET['colA'],
    'colB' => $_GET['colB'],
]);
Nowhereresult説明
0''-値が(phpで)空判定される場合、その条件はスルーされる。空とは null || '' || [] || 全てが!で除外された QueryBuilder のこと
1'hoge = 1'hoge = 1['hoge = 1'] と同じ。単一文字列指定は配列化される
2['hoge = 1']hoge = 1キーを持たないただの配列はそのまま条件文になる
3['hoge = ?' => 1]hoge = 1キーに ? を含む配列は普通に想起されるプリペアードステートメントになる
4['hoge = ? OR fuga = ?' => [1, 2]]hoge = 1 OR fuga = 2キーに ? を複数含む配列はパラメータがそれぞれのプレースホルダにバインドされる
5['hoge' => 1]hoge = 1キーに ? を含まない [キー => 値] はキーがカラム名、値が bind 値とみなして = で結合される
6['hoge' => null]hoge IS NULL上記と同じだが、値が null の場合は IS NULL 指定とみなす
7['hoge' => [1, 2, 3]]hoge IN (1, 2, 3)上上記と同じだが、値が配列の場合は IN 指定とみなす
8['hoge' => []]hoge IN (NULL)値が空配列の場合は IN(NULL) になる(DBMSにもよるが、実質的には FALSE と同義)
9['hoge:LIKE' => 'xxx']hoge LIKE ('xxx'):演算子を付与するとその演算子で比較が行われる
10['hoge:!LIKE' => 'xxx']NOT (hoge LIKE ('xxx')): で演算子を明示しかつ ! を付与すると全体として NOT で囲まれる
11['hoge:!' => 'xxx']NOT (hoge = 'xxx'): 以降がない場合はNo.5~8 とみなすその否定なので NOT = になる
15[':hoge']hoge = :hoge:hoge のようにコロンで始まる要素は 'hoge = :hoge' に展開される(prepare の利便性が上がる)
21['(hoge, fuga)'] => [[1, 2], [3, 4]](hoge, fuga) IN ((1, 2), (3, 4))行値式のようなキーは IN に展開される
22['!hoge' => '']-キーが "!" で始まるかつ bind 値が(phpで)空判定される場合、その条件文自体が抹消される(記号は同じだが前述の :!演算子 とは全く別個)
23['AND/OR' => ['hoge' => 1, 'fuga' => 2]]hoge = 1 OR fuga = 2キーが "AND/OR" の場合は特別扱いされ、AND/OR コンテキストの切り替えが行わる
24['NOT' => ['hoge' => 1, 'fuga' => 2]]NOT(hoge = 1 AND fuga = 2)キーが "NOT" の場合も特別扱いされ、その要素を NOT で反転する
25[QueryBuilder]QueryBuilder の文字列表現をそのまま埋め込む。EXISTS などでよく使用されるが、使い方を誤ると「Operand should contain 1 column(s)」とか「Subquery returns more than 1 row」とか言われるので注意
26['hoge' => QueryBuilder]キー付きで QueryBuilder を渡すとサブクエリで条件演算される。左記の場合は hoge IN (QueryBuilder) となる
27[Operator]条件式の代わりに Operator インスタンスを渡すことができるが、難解なので説明は省略
28['hoge' => function () {}]クロージャを渡すとクロージャの実行結果が「あたかもそこにあるかのように」振る舞う

No.9,10 の演算子は LIKEBETWEENIS NULL 、範囲指定できる独自の [~] 演算子などがある。
組み込みの演算子は ryunosuke\dbml\Query\Expression\Operator を参照。

このメソッドは内部で頻繁に使用される。
具体的には QueryBuilder::select の第2引数、 JOIN の ON 指定、 update/delete などの WHERE 条件など。
これらの箇所ではすべて上記の記法が使用できる。

# No.22(検索画面などの http 経由(文字列)でパラメータが流れてくる状況で便利)
if ($id) {
    $wheres['id'] = $id;
}
$wheres['!id'] = $id; // 上記コードとほぼ同義
// 空の定義には「全ての条件が!で除外されたQueryBuilder」も含むので、下記のコードは空の WHERE になる
$wheres['!subid IN(?)'] = $db->select('subtable.id', ['!name' => ''])->exists();

# No.9,10(ややこしいことをしないで手軽に演算子が埋め込める)
$wheres['name:%LIKE%'] = 'hoge';  // WHERE name LIKE "%hoge%"
$wheres['period:(~]'] = [0, 100]; // WHERE period > 0 AND period <= 100

# No.11(:以降がない場合は No.5~8 になる)
$wheres['id'] = 1;        // WHERE id = 1
$wheres['id:'] = 1;       // ↑と同じ
$wheres['id:!'] = 1;      // 用途なしに見えるが、このように:!とすると WHERE NOT (id = 1) になり、否定が行える
$wheres['id:!'] = [1, 2]; // No.5~8 相当なので配列を与えれば WHERE NOT (id IN (1, 2)) になり、IN の否定が行える

# No.15(:hoge は hoge = :hoge になる。頻度は低いが下記のように prepare 化するときに指定が楽になる)
$stmt = $db->prepareDelete('table_name', ['id = :id']);    // prepare するときは本来ならこのように指定すべきだが・・・
$stmt = $db->prepareDelete('table_name', ['id' => ':id']); // このようなミスがよくある(これは id = ":id" に展開されるのでエラーになる)
$stmt = $db->prepareDelete('table_name', ':id');           // このように指定したほうが平易で良い。そしてこの時点で id = :id になるので・・・
$stmt->executeUpdate(['id' => 1]);                         // WHERE id = 1 で実行できる
$stmt->executeUpdate(['id' => 2]);                         // WHERE id = 2 で実行できる

# No.23(最高にややこしいが、実用上は「OR する場合は配列で包む」という認識でまず事足りるはず)
# 原則として配列間は AND で結合される。しかし、要素を配列で包むと、現在のコンテキストとは逆(AND なら OR、OR なら AND)の演算子で結合させることができる
$wheres = [
    'delete_flg' => 0,
    [
        'create_date < ?' => '2016-01-01',
        'update_date < ?' => '2016-01-01',
        ['condA', 'condB']
    ]
];
// WHERE delete_flg = 0 AND ((create_time < '2016-01-01') OR (update_date < '2016-01-01') OR (condA AND condB))

// AND を明示することで (create_date, update_date) 間の結合が AND になる
$wheres = [
    'delete_flg' => 0,
    'AND' => [
        'create_date < ?' => '2016-01-01',
        'update_date < ?' => '2016-01-01',
        ['condA', 'condB']
    ]
]);
// WHERE delete_flg = 0 AND ((create_time < '2016-01-01') AND (update_date < '2016-01-01') AND (condA OR condB))

// 上記のような複雑な用途はほとんどなく、実際は下記のような「(アクティブで姓・名から LIKE 検索のような)何らかの AND と OR を1階層」程度が多い
$wheres = [
    'delete_flg' => 0,
    // 要するに配列で包むと OR になる
    [
        'sei:%LIKE%' => 'hoge',
        'mei:%LIKE%' => 'hoge',
    ]
]);
// WHERE delete_flg = 0 AND ((sei LIKE "%hoge%") OR (mei LIKE "%hoge%"))

# No.24(NOT キーで要素が NOT で囲まれる)
$wheres = [
    'delete_flg' => 0,
    'NOT' => [
        'sei:%LIKE%' => 'hoge',
        'mei:%LIKE%' => 'hoge',
    ],
];
// WHERE (delete_flg = '0') AND (NOT ((sei LIKE '%hoge%') AND (mei LIKE '%hoge%')))

# No.25,26(クエリビルダを渡すとそれらしく埋め込まれる)
$wheres = [
    // ただの EXSISTS クエリになる
    $db->select('subtable')->exists(),
    // ? なしのデフォルトではサブクエリの IN になる
    'subid1' => $db->select('subtable.subid'),
    // ? 付きだとそのとおりになる(ここでは = だが <> とか BETWEEN でも同じ。埋め込み演算子も使える)
    'subid2 = ?' => $db->select('subtable.subid')->limit(1),
];
// WHERE EXISTS(SELECT * FROM subtable) AND (subid1 IN (SELECT subid FROM subtable)) AND (subid2 = (SELECT subid FROM subtable))

# No.28(クロージャを使うと三項演算子を駆使する必要はない上、スコープを閉じ込めることができる)
$wheres = [
    // $condition 次第で EXISTS したい(この程度なら三項演算子で十分だが、もっと複雑だと三項演算子で救いきれない)
    function ($db) use ($condition) {
        if (!$condition) {
            return [];
        }
        return $db->select('t_example', $condition)->exists();
    },
];

method ryunosuke\dbml\Database::anywhere ($table, $word) : array

テーブル名とワードを与えると「なんとなくよしなに検索してくれるだろう」where 配列を返す

具体的には基本的に下記。

検索オプションは下記。

オプションの優先順位は下記(下に行くほど高い)。

# テーブル定義は下記とする
# - tablename
#   - id: int
#   - parent_id: int(外部キー)
#   - title: string
#   - content: text
#   - create_date: datetime

# 全ての数値カラムの完全一致検索
$db->whereInto($db->anywhere('tablename', 123), $params);
// WHERE (id = '123') OR (parent_id = '123')

# 全ての文字列カラムの包含検索(スペースは%に変換される)
$db->whereInto($db->anywhere('tablename', 'ho ge'), $params);
// WHERE (title LIKE '%ho%ge%') OR (content LIKE '%ho%ge%')

# 全ての日時カラムの範囲検索
$db->whereInto($db->anywhere('tablename', '2000/12/04'), $params);
// WHERE (create_date BETWEEN '2000-12-04 00:00:00' AND '2000-12-04 23:59:59')

# 上記で 00:00:00 が補完されているのは指定が年月日だからであり、 2000/12 だけを指定すると下記のようになる
$db->whereInto($db->anywhere('tablename', '2000/12'), $params);
// WHERE (create_date BETWEEN '2000-12-01 00:00:00' AND '2000-12-31 23:59:59')

上記のようにまさに「よしなに」検索してくれる機能で、画面の右上に1つの検索窓を配置するような場合に適している。
ただし、想像の通り恐ろしく重いクエリとなりがちなので使い所を見極めるのが肝要。
一応少しカラムを減らせるオプションを用意してあるが、説明は省く(そんなに多くないのでソースを直確認を推奨)。

もっとも、このメソッド自体を明示的に使うことは少ないと思われる。もっぱら ryunosuke\dbml\Query\QueryBuilder::where() で自動的に使われる。

method ryunosuke\dbml\Database::createQueryBuilder () : ryunosuke\dbml\Query\QueryBuilder

クエリビルダを生成して返す

極力 new QueryBuilder せずにこのメソッドを介すこと。

method ryunosuke\dbml\Database::fetchArray ($sql, $params = []) : arrayryunosuke\dbml\Entity\Entityable[]

レコードの配列を返す

$db->fetchArray('SELECT id, name FROM tablename');
// results:
[
    [
        'id'   => 1,
        'name' => 'name1',
    ],
    [
        'id'   => 2,
        'name' => 'name2',
    ],
];

method ryunosuke\dbml::fetchArrayOrThrow ($sql, $params = []) : arrayryunosuke\dbml\Entity\Entityable[]

fetchArray() の例外送出版

method ryunosuke\dbml\Database::fetchAssoc ($sql, $params = []) : arrayryunosuke\dbml\Entity\Entityable[]

レコードの連想配列を返す

$db->fetchAssoc('SELECT id, name FROM tablename');
// results:
[
    1 => [
        'id'   => 1,
        'name' => 'name1',
    ],
    2 => [
        'id'   => 2,
        'name' => 'name2',
    ],
];

method ryunosuke\dbml::fetchAssocOrThrow ($sql, $params = []) : arrayryunosuke\dbml\Entity\Entityable[]

fetchAssoc() の例外送出版

method ryunosuke\dbml\Database::fetchLists ($sql, $params = []) : arrayryunosuke\dbml\Entity\Entityable[]

レコード[1列目]の配列を返す

$db->fetchLists('SELECT name FROM tablename');
// results:
[
    'name1',
    'name2',
];

method ryunosuke\dbml::fetchListsOrThrow ($sql, $params = []) : array

fetchLists() の例外送出版

method ryunosuke\dbml\Database::fetchPairs ($sql, $params = []) : arrayryunosuke\dbml\Entity\Entityable[]

レコード[1列目=>2列目]の連想配列を返す

$db->fetchPairs('SELECT id, name FROM tablename');
// results:
[
    1 => 'name1',
    2 => 'name2',
];

method ryunosuke\dbml::fetchPairsOrThrow ($sql, $params = []) : array

fetchPairs() の例外送出版

method ryunosuke\dbml\Database::fetchTuple ($sql, $params = []) : arrayryunosuke\dbml\Entity\Entityablefalse

レコードを返す

このメソッドはフェッチ結果が2件以上だと例外を投げる
これは

のを予防的に阻止するため必要な仕様である。

$db->fetchTuple('SELECT id, name FROM tablename LIMIT 1');
// results:
[
    'id'   => 1,
    'name' => 'name1',
];

method ryunosuke\dbml::fetchTupleOrThrow ($sql, $params = []) : arrayryunosuke\dbml\Entity\Entityablefalse

fetchTuple() の例外送出版

method ryunosuke\dbml\Database::fetchValue ($sql, $params = []) : mixed

レコード[1列目]を返す

このメソッドはフェッチ結果が2件以上だと例外を投げる
これは

のを予防的に阻止するために必要な仕様である。

$db->fetchValue('SELECT name FROM tablename LIMIT 1');
// results:
'name1';

method ryunosuke\dbml::fetchValueOrThrow ($sql, $params = []) : mixed

fetchValue() の例外送出版

method ryunosuke\dbml\Database::select ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : ryunosuke\dbml\Query\QueryBuilder

各句を指定してクエリビルダを生成する

// 単純にクエリビルダオブジェクトを取得する
$qb = $db->select('tablename', ['create_date < ?' => '2000-12-23 12:34:56']);

// array/assoc などのプロキシメソッドで直接結果を取得する
$results = $db->selectArray('tablename', ['create_date < ?' => '2000-12-23 12:34:56']); // 結果形式は fetchArray と同じ
$results = $db->selectAssoc('tablename', ['create_date < ?' => '2000-12-23 12:34:56']); // 結果形式は fetchAssoc と同じ
$results = $db->selectLists('tablename', ['create_date < ?' => '2000-12-23 12:34:56']); // 結果形式は fetchLists と同じ
$results = $db->selectPairs('tablename', ['create_date < ?' => '2000-12-23 12:34:56']); // 結果形式は fetchPairs と同じ
$results = $db->selectTuple('tablename', ['create_date < ?' => '2000-12-23 12:34:56']); // 結果形式は fetchTuple と同じ
$results = $db->selectValue('tablename', ['create_date < ?' => '2000-12-23 12:34:56']); // 結果形式は fetchValue と同じ

$tableDescriptor, $where はかなり多彩な指定が可能。下記のメソッドも参照。

method ryunosuke\dbml::selectArray ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityable[]

select() の array 版(ryunosuke\dbml\Database::fetchArray() も参照)

method ryunosuke\dbml::selectArrayInShare ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityable[]

selectArray() の共有ロック版(ryunosuke\dbml\Database::fetchArray() も参照)

method ryunosuke\dbml::selectArrayForUpdate ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityable[]

selectArray() の排他ロック版(ryunosuke\dbml\Database::fetchArray() も参照)

method ryunosuke\dbml::selectArrayOrThrow ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityable[]

selectArray() の例外送出版(ryunosuke\dbml\Database::fetchArray() も参照)

method ryunosuke\dbml::selectAssoc ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityable[]

select() の assoc 版(ryunosuke\dbml\Database::fetchAssoc() も参照)

method ryunosuke\dbml::selectAssocInShare ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityable[]

selectAssoc() の共有ロック版(ryunosuke\dbml\Database::fetchAssoc() も参照)

method ryunosuke\dbml::selectAssocForUpdate ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityable[]

selectAssoc() の排他ロック版(ryunosuke\dbml\Database::fetchAssoc() も参照)

method ryunosuke\dbml::selectAssocOrThrow ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityable[]

selectAssoc() の例外送出版(ryunosuke\dbml\Database::fetchAssoc() も参照)

method ryunosuke\dbml::selectLists ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : array

select() の lists 版(ryunosuke\dbml\Database::fetchLists() も参照)

method ryunosuke\dbml::selectListsInShare ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : array

selectLists() の共有ロック版(ryunosuke\dbml\Database::fetchLists() も参照)

method ryunosuke\dbml::selectListsForUpdate ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : array

selectLists() の排他ロック版(ryunosuke\dbml\Database::fetchLists() も参照)

method ryunosuke\dbml::selectListsOrThrow ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : array

selectLists() の例外送出版(ryunosuke\dbml\Database::fetchLists() も参照)

method ryunosuke\dbml::selectPairs ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : array

select() の pairs 版(ryunosuke\dbml\Database::fetchPairs() も参照)

method ryunosuke\dbml::selectPairsInShare ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : array

selectPairs() の共有ロック版(ryunosuke\dbml\Database::fetchPairs() も参照)

method ryunosuke\dbml::selectPairsForUpdate ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : array

selectPairs() の排他ロック版(ryunosuke\dbml\Database::fetchPairs() も参照)

method ryunosuke\dbml::selectPairsOrThrow ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : array

selectPairs() の例外送出版(ryunosuke\dbml\Database::fetchPairs() も参照)

method ryunosuke\dbml::selectTuple ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityablefalse

select() の tuple 版(ryunosuke\dbml\Database::fetchTuple() も参照)

method ryunosuke\dbml::selectTupleInShare ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityablefalse

selectTuple() の共有ロック版(ryunosuke\dbml\Database::fetchTuple() も参照)

method ryunosuke\dbml::selectTupleForUpdate ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityablefalse

selectTuple() の排他ロック版(ryunosuke\dbml\Database::fetchTuple() も参照)

method ryunosuke\dbml::selectTupleOrThrow ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityablefalse

selectTuple() の例外送出版(ryunosuke\dbml\Database::fetchTuple() も参照)

method ryunosuke\dbml::selectValue ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : mixed

select() の value 版(ryunosuke\dbml\Database::fetchValue() も参照)

method ryunosuke\dbml::selectValueInShare ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : mixed

selectValue() の共有ロック版(ryunosuke\dbml\Database::fetchValue() も参照)

method ryunosuke\dbml::selectValueForUpdate ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : mixed

selectValue() の排他ロック版(ryunosuke\dbml\Database::fetchValue() も参照)

method ryunosuke\dbml::selectValueOrThrow ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : mixed

selectValue() の例外送出版(ryunosuke\dbml\Database::fetchValue() も参照)

method ryunosuke\dbml\Database::entity ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : ryunosuke\dbml\Query\QueryBuilder

各句を指定してエンティティ用クエリビルダを生成する

エンティティクラスは駆動表で決まる。

// 単純にクエリビルダオブジェクトを取得する
$qb = $db->entity('tablename', ['create_date < ?' => '2000-12-23 12:34:56']);

// array/assoc などのプロキシメソッドで直接結果を取得する
$results = $db->entityArray('tablename', ['create_date < ?' => '2000-12-23 12:34:56']); // エンティティインスタンスの配列を返す
$results = $db->entityAssoc('tablename', ['create_date < ?' => '2000-12-23 12:34:56']); // エンティティインスタンスの連想配列(キーは最初のカラム)を返す
$results = $db->entityTuple('tablename', ['create_date < ?' => '2000-12-23 12:34:56']); // エンティティインスタンスを返す

$tableDescriptor, $where はかなり多彩な指定が可能。下記のメソッドも参照。

method ryunosuke\dbml::entityArray ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityable[]

entity() の array 版

method ryunosuke\dbml::entityArrayInShare ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityable[]

entityArray() の共有ロック版

method ryunosuke\dbml::entityArrayForUpdate ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityable[]

entityArray() の排他ロック版

method ryunosuke\dbml::entityArrayOrThrow ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityable[]

entityArray() の例外送出版

method ryunosuke\dbml::entityAssoc ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityable[]

entity() の assoc 版

method ryunosuke\dbml::entityAssocInShare ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityable[]

entityAssoc() の共有ロック版

method ryunosuke\dbml::entityAssocForUpdate ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityable[]

entityAssoc() の排他ロック版

method ryunosuke\dbml::entityAssocOrThrow ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityable[]

entityAssoc() の例外送出版

method ryunosuke\dbml::entityTuple ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityablefalse

entity() の tuple 版

method ryunosuke\dbml::entityTupleInShare ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityablefalse

entityTuple() の共有ロック版

method ryunosuke\dbml::entityTupleForUpdate ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityablefalse

entityTuple() の排他ロック版

method ryunosuke\dbml::entityTupleOrThrow ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : arrayryunosuke\dbml\Entity\Entityable

entityTuple() の例外送出版

method ryunosuke\dbml\Database::subselect ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : ryunosuke\dbml\Query\QueryBuilder

子供レコード配列を取得するビルダを返す

このメソッドを使うと自身のレコード配列に子供レコードを生やすことができる。
この処理はクエリを2回投げることで実現される。つまり 1 + N 問題は起こらない(tuple だけではなく array/assoc でも同様)。
この挙動は setLazyMode で変更可能。

WHERE や ORDER などの条件も完全に活かすことができるが、LIMIT だけは扱いが異なる(下記のサンプルコードを参照)。
これを利用するといわゆる「グループ内の上位N件取得」も簡単に実現できる。

親子の結合条件は原則として外部キーが前提。
外部キーがない・特殊な条件で結合したい場合は親側のキーに {cond} でカラムを指定する。

# t_parent に紐づく t_child レコードを引っ張る
$row = $db->selectTuple([
    't_parent P' => [
        'parent_id',
        // 外部キーが使用される
        'childarray'            => $db->subselectArray('t_child'),
        // 結合カラムを明示的に指定
        'childassoc{cid: pid}'  => $db->subselectAssoc('t_child'),
    ],
]);

# サブの limit は各行に対して作用する
$rows = $db->selectArray([
    't_parent P' => [
        'parent_id',
        // 各行に紐づく t_child の最新5件を取得する
        'latestchildren' => $db->subselectArray('t_child', [], ['update_time' => 'DESC'], 5),
    ],
]);

# 簡易記法としての配列形式(t_parent に紐づく t_child レコードを引っ張る)
$row = $db->selectTuple([
    't_parent P' => [
        'parent_id',
        // 親のキーがテーブル名(エイリアス)の役目を果たし、原則として assoc 相当の動作になる
        // つまり下記2つは全く同じ動作となる
        'childassoc1'            => $db->subselectAssoc('t_child'),
        't_child AS childassoc2' => ['*'],
    ],
]);

# ネストもできる(t_ancestor に紐づく t_parent に紐づく t_child レコードを引っ張る)
$row = $db->selectTuple([
    't_ancestor AS A' => [
        't_parent AS P' => [
            't_child AS C' => ['*'],
        ],
    ],
]);

method ryunosuke\dbml::subselectArray ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : ryunosuke\dbml\Query\QueryBuilder

子供レコード(array)を表すサブビルダを返す(subselect() を参照)

method ryunosuke\dbml::subselectAssoc ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : ryunosuke\dbml\Query\QueryBuilder

子供レコード(assoc)を表すサブビルダを返す(subselect() を参照)

method ryunosuke\dbml::subselectLists ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : ryunosuke\dbml\Query\QueryBuilder

子供レコード(lists)を表すサブビルダを返す(subselect() を参照)

method ryunosuke\dbml::subselectPairs ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : ryunosuke\dbml\Query\QueryBuilder

子供レコード(pairs)を表すサブビルダを返す(subselect() を参照)

method ryunosuke\dbml::subselectTuple ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : ryunosuke\dbml\Query\QueryBuilder

子供レコード(tuple)を表すサブビルダを返す(subselect() を参照)

method ryunosuke\dbml::subselectValue ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : ryunosuke\dbml\Query\QueryBuilder

子供レコード(value)を表すサブビルダを返す(subselect() を参照)

method ryunosuke\dbml\Database::subquery ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : ryunosuke\dbml\Query\QueryBuilder

相関サブクエリ表すビルダを返す

単純に相関のあるテーブルとの外部キーを追加するだけの動作となる。
subexists や subcount, submin などはこのメソッドの特殊化と言える。

// SELECT 句での使用例
$db->select([
    't_article' => [
        // 各 t_article に紐づく t_comment の ID を結合する
        'comment_ids' => $db->subquery('t_comment.GROUP_CONCAT(comment_id)'),
    ],
]);
// SELECT
//   (SELECT GROUP_CONCAT(comment_id) FROM t_comment WHERE t_comment.article_id = t_article.article_id) AS comment_ids
// FROM t_article

// WHERE 句での使用例
$db->select('t_article', [
    // active な t_comment を持つ t_article を取得する(ただし、この例なら EXISTS で十分)
    'article_id' => $db->subquery('t_comment', ['status' => 'active']),
]);
// SELECT
//   t_article.*
// FROM t_article
// WHERE
//   article_id IN(
//     SELECT t_comment.article_id FROM t_comment WHERE
//       t_comment.status = 'active' AND
//       t_comment.article_id = t_article.article_id
//   )

method ryunosuke\dbml\Database::subexists ($tableDescriptor, $where = []) : ryunosuke\dbml\Query\QueryBuilder

相関サブクエリの EXISTS を表すビルダを返す

// SELECT 句での使用例
$db->select([
    't_article' => [
        // 各 t_article に紐づく t_comment にレコードを持つなら true が返される
        'has_comment'     => $db->subexists('t_comment'),
        // 各 t_article に紐づく t_comment delete_flg = 0 なレコードを持たないなら true が返される
        'has_not_comment' => $db->notSubexists('t_comment', ['delete_flg' => 0]),
    ],
]);
// SELECT
//   EXISTS (SELECT * FROM t_comment WHERE t_comment.article_id = t_article.article_id) AS has_comment,
//   NOT EXISTS (SELECT * FROM t_comment WHERE (delete_flg = '0') AND (t_comment.article_id = t_article.article_id)) AS has_not_comment
// FROM t_article

// WHERE 句での使用例
$db->select('t_article', [
    // 「各記事でコメントを持つ記事」を表す WHERE EXISTS になる
    $db->subexists('t_comment'),
]);
// SELECT
//   t_article.*
// FROM t_article
// WHERE (EXISTS (SELECT * FROM t_comment WHERE t_comment.article_id = t_article.article_id))

// JOIN も含めて複数テーブルがあり、明確に「t_article と t_comment で」結びたい場合はキーで明示する
$db->select('t_article, t_something', [
    // 「何と?」をキーで明示できる
    't_article'          => $db->subexists('t_comment'),
    // これだと t_something と t_comment での結合となる(外部キーがあれば、だが)
    't_something'        => $db->subexists('t_comment'),
    // さらに t_something に複数の外部キーがある場合は:で明示できる
    't_something:fkname' => $db->subexists('t_comment'),
]);

method ryunosuke\dbml\Database::notSubexists ($tableDescriptor, $where = []) : ryunosuke\dbml\Query\QueryBuilder

ryunosuke\dbml\Database::subexists() の否定版

method ryunosuke\dbml\Database::subaggregate ($aggregate, $column, $where = []) : ryunosuke\dbml\Query\QueryBuilder

相関サブクエリの aggaregate を表すビルダを返す

下記のような subXXX のために存在しているので、このメソッドを直接呼ぶような状況はあまり無い。

# SELECT 句での使用例
$db->select([
    't_article' => [
        // t_article に紐づく t_comment の数を返す
        'subcount' => $db->subcount('t_comment'),
        // t_article に紐づく t_comment.comment_id の最小値を返す
        'submin'   => $db->submin('t_comment.comment_id'),
        // t_article に紐づく t_comment.comment_id の最大値を返す
        'submax'   => $db->submax('t_comment.comment_id'),
        // t_article に紐づく t_comment.comment_id の合計値を返す
        'subsum'   => $db->subsum('t_comment.comment_id'),
        // t_article に紐づく t_comment.comment_id の平均値を返す
        'subavg'   => $db->subavg('t_comment.comment_id'),
    ],
]);
// SELECT
//   (SELECT COUNT(*) AS `*@count` FROM t_comment WHERE t_comment.article_id = t_article.article_id) AS subcount,
//   (SELECT MIN(t_comment.comment_id) AS `t_comment.comment_id@min` FROM t_comment WHERE t_comment.article_id = t_article.article_id) AS submin,
//   (SELECT MAX(t_comment.comment_id) AS `t_comment.comment_id@max` FROM t_comment WHERE t_comment.article_id = t_article.article_id) AS submax,
//   (SELECT SUM(t_comment.comment_id) AS `t_comment.comment_id@sum` FROM t_comment WHERE t_comment.article_id = t_article.article_id) AS subsum,
//   (SELECT AVG(t_comment.comment_id) AS `t_comment.comment_id@avg` FROM t_comment WHERE t_comment.article_id = t_article.article_id) AS subavg
// FROM t_article

# WHERE 句での使用例1
$db->select('t_article A', [
    // 「各記事でコメントが3件以上」を表す
    '3 < ?' => $db->subcount('t_comment'),
]);
// SELECT A.*
// FROM t_article A
// WHERE
//   3 < (
//     SELECT COUNT(*) AS `*@count`
//     FROM t_comment
//     WHERE t_comment.article_id = A.article_id
//   )

# WHERE 句での使用例2
$db->select('t_article A+t_comment C', [
    // 「各記事で最新のコメント1件と結合」を表す
    'C.comment_id' => $db->submax('t_comment.comment_id'),
]);
// SELECT A.*, C.*
// FROM t_article A
// INNER JOIN t_comment C ON C.article_id = A.article_id
// WHERE C.comment_id IN (
//   SELECT MAX(t_comment.comment_id) AS `t_comment.comment_id@max`
//   FROM t_comment
//   WHERE t_comment.article_id = A.article_id
// )

method ryunosuke\dbml::subcount ($column, $where = []) : ryunosuke\dbml\Query\QueryBuilder

相関サブクエリの COUNT を表すビルダを返す(subaggregate() を参照)

method ryunosuke\dbml::submin ($column, $where = []) : ryunosuke\dbml\Query\QueryBuilder

相関サブクエリの MIN を表すビルダを返す(subaggregate() を参照)

method ryunosuke\dbml::submax ($column, $where = []) : ryunosuke\dbml\Query\QueryBuilder

相関サブクエリの MAX を表すビルダを返す(subaggregate() を参照)

method ryunosuke\dbml::subsum ($column, $where = []) : ryunosuke\dbml\Query\QueryBuilder

相関サブクエリの SUM を表すビルダを返す(subaggregate() を参照)

method ryunosuke\dbml::subavg ($column, $where = []) : ryunosuke\dbml\Query\QueryBuilder

相関サブクエリの AVG を表すビルダを返す(subaggregate() を参照)

method ryunosuke\dbml\Database::union ($unions, $column = [], $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : ryunosuke\dbml\Query\QueryBuilder

UNION する

FROM が $unions 節のサブクエリになり、$column や $where はそのサブクエリに対して適用される。

$db->union(['SELECT "a"', 'SELECT "b"']);
// → シンプルに `SELECT "a" UNION SELECT "b"` と解釈される

$db->union(['SELECT "a1" AS c1, "a2" AS c2', 'SELECT "b1" AS c1, "b2" AS c2'], ['c1']);
// → UNION 部が FROM 句に飲み込まれ `SELECT c1 FROM (SELECT "a1" AS c1, "a2" AS c2 UNION SELECT "b1" AS c1, "b2" AS c2) AS T` と解釈される

$db->union(['SELECT "a1" AS c1, "a2" AS c2', 'SELECT "b1" AS c1, "b2" AS c2'], ['c1'], ['c2' => 'b1']);
// → UNION 部が FROM 句に飲み込まれ `SELECT c1 FROM (SELECT "a1" AS c1, "a2" AS c2 UNION SELECT "b1" AS c1, "b2" AS c2) AS T WHERE c2 = "b1"` と解釈される

$db->unionAll([$db->select('t_article'), $db->select('t_article')]);
// → クエリビルダも使える(倍の行を取得できる。あくまで例なので意味はない)

method ryunosuke\dbml\Database::unionAll ($unions, $column = [], $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : ryunosuke\dbml\Query\QueryBuilder

UNION ALL する

ALL で UNION される以外は ryunosuke\dbml\Database::union() と全く同じ。

method ryunosuke\dbml\Database::exists ($tableDescriptor, $where = [], $for_update = false) : bool

レコードの存在を返す

# 単純に t_article が存在するか bool で返す
$db->exists('t_article');
// SELECT EXISTS (SELECT * FROM t_article)

# 有効な t_article が存在するか bool で返す
$db->exists('t_article', ['delete_flg' => 0]);
// SELECT EXISTS (SELECT * FROM t_article WHERE t_article.delete_flg = 0)

# 有効な t_article が存在するかロックしつつ bool で返す
$db->exists('t_article', ['delete_flg' => 0], true);
// SELECT EXISTS (SELECT * FROM t_article WHERE t_article.delete_flg = 0 FOR UPDATE)

method ryunosuke\dbml\Database::selectExists ($tableDescriptor, $where = [], $for_update = false) : ryunosuke\dbml\Query\QueryBuilder

EXISTS クエリビルダを返す

// EXISTS (SELECT * FROM t_table)
$db->selectExists('t_table');

// NOT EXISTS (SELECT * FROM t_table WHERE delete_flg = 0)
$db->selectNotExists('t_table', ['delete_flg' => 0]);

method ryunosuke\dbml\Database::selectNotExists ($tableDescriptor, $where = [], $for_update = false) : ryunosuke\dbml\Query\QueryBuilder

ryunosuke\dbml\Database::selectExists() の NOT 版

method ryunosuke\dbml\Database::selectAggregate ($aggregation, $column, $where = [], $groupBy = [], $having = []) : ryunosuke\dbml\Query\QueryBuilder

集約クエリビルダを返す

ryunosuke\dbml\Database::selectCount() などのために存在し、明示的に呼ぶことはほとんど無い。

// SELECT COUNT(group_id) FROM t_table
$db->selectCount('t_table.group_id');

// SELECT MAX(id) FROM t_table WHERE delete_flg = 0 GROUP BY group_id
$db->selectMax('t_table.id', ['delete_flg' => 0], 'group_id');

method ryunosuke\dbml::selectCount ($column, $where = [], $groupBy = [], $having = []) : ryunosuke\dbml\Query\QueryBuilder

COUNT クエリを返す(selectAggregate() を参照)

method ryunosuke\dbml::selectMin ($column, $where = [], $groupBy = [], $having = []) : ryunosuke\dbml\Query\QueryBuilder

MIN クエリを返す(selectAggregate() を参照)

method ryunosuke\dbml::selectMax ($column, $where = [], $groupBy = [], $having = []) : ryunosuke\dbml\Query\QueryBuilder

MAX クエリを返す(selectAggregate() を参照)

method ryunosuke\dbml::selectSum ($column, $where = [], $groupBy = [], $having = []) : ryunosuke\dbml\Query\QueryBuilder

SUM クエリを返す(selectAggregate() を参照)

method ryunosuke\dbml::selectAvg ($column, $where = [], $groupBy = [], $having = []) : ryunosuke\dbml\Query\QueryBuilder

AVG クエリを返す(selectAggregate() を参照)

method ryunosuke\dbml\Database::neighbor ($tableDescriptor, $predicates, $limit = 1) : array

特定レコードの前後のレコードを返す

ryunosuke\dbml\Query\QueryBuilder::neighbor() へのプロキシメソッド。

method ryunosuke\dbml\Database::aggregate ($aggregation, $column, $where = [], $groupBy = [], $having = []) : intarray

集約を実行する

// t_table.group_id の COUNT がスカラー値で得られる
$db->aggregate('count', 't_table.group_id');

// t_table.group_id の AVG がキーペアで得られる
$db->aggregate('avg', 't_table.group_id', [], 't_table.group_id');

// t_table.group_id の MIN,MAX が連想配列で得られる
$db->aggregate(['min', 'max'], 't_table.group_id', [], 't_table.group_id');

が、グループのキーが SELECT されたり、順番が大事だったりするので、実用上の利点はほとんどない。
同じ条件、グループで MIN, MAX を一回で取りたい、のような状況で使う程度で、どちらかと言えば下記の集約関数の個別メソッドのために存在している。

// t_table の件数をスカラー値で返す
$db->count('t_table');

// id 10 未満の t_table.id の最小値をスカラー値で返す
$db->min('t_table.id', ['id < 10']);

// id 10 未満の group_id でグルーピングした t_table.id の最大値を `[group_id => max]` 形式で返す
$db->max('t_table.id', ['id < 10'], ['group_id']);

// id 10 未満の group_id でグルーピングした t_table.score の合計値が 5 以上のものを `[group_id => [id@sum => id@sum, score@sum => score@sum]]` 形式で返す
$db->sum('t_table.id,score', ['id < 10'], ['group_id'], ['score@sum >= 5']);

特殊な使い方として $aggregate に連想配列を渡すとクロス集計ができる。
これはこのメソッドのかなり特異な使い方で、そういったことがしたい場合は普通にクエリビルダや生クエリでも実行できるはず。

# t_login テーブルから user_id ごとの2016~2018年度月次集計を返す
$db->aggregate([
    'year_2016' => 'SUM(YEAR(login_at) = "2016")',              // 文字列でも良いがインジェクションの危険アリ
    'year_2017' => $db->raw('SUM(YEAR(login_at) = ?)', '2017'), // 普通は raw で Expression を渡す
    'year_2018' => ['SUM(YEAR(login_at) = ?)' => '2018'],       // 配列を渡すと自動で Expression 化される
], 't_login', ['login_at:[~)' => ['2016-01-01', '2019-01-01']], 'user_id');
// SELECT
//     user_id,
//     SUM(YEAR(login_at) = "2016") AS `year_2016`,
//     SUM(YEAR(login_at) = "2017") AS `year_2017`,
//     SUM(YEAR(login_at) = "2018") AS `year_2018`
// FROM
//     t_login
// WHERE
//     login_at >= "2016-01-01" AND login_at < "2019-01-01"
// GROUP BY
//     user_id

# 上記は式が同じで値のみ異なるので省略記法が存在する
$db->aggregate([
    'SUM(YEAR(login_at) = ?)' => ['2016', '2017', '2018'],
], 't_login', ['login_at:[~)' => ['2016-01-01', '2019-01-01']], 'user_id');
// 生成される SQL は同じ

method ryunosuke\dbml::count ($column, $where = [], $groupBy = [], $having = []) : intfloat

COUNT クエリを実行する(aggregate() を参照)

method ryunosuke\dbml::min ($column, $where = [], $groupBy = [], $having = []) : intfloat

MIN クエリを実行する(aggregate() を参照)

method ryunosuke\dbml::max ($column, $where = [], $groupBy = [], $having = []) : intfloat

MAX クエリを実行する(aggregate() を参照)

method ryunosuke\dbml::sum ($column, $where = [], $groupBy = [], $having = []) : intfloat

SUM クエリを実行する(aggregate() を参照)

method ryunosuke\dbml::avg ($column, $where = [], $groupBy = [], $having = []) : intfloat

AVG クエリを実行する(aggregate() を参照)

method ryunosuke\dbml\Database::yield ($sql, $params = []) : ryunosuke\dbml\Generator\Yielder

行を少しずつ返してくれるオブジェクトを返す

返却されたオブジェクトは foreach で回すことができ、かつ PDO::fetch で実装されていて省メモリで動作する。
さらにいくつか特殊な事ができるが ryunosuke\dbml\Generator\Yielder::setBufferMode(), ryunosuke\dbml\Generator\Yielder::setEmulationUnique() あたりを参照。

# シンプルな例
foreach ($db->yieldArray('SELECT * FROM very_many_heavy_table') as $row) {
    // 一気に取得ではなく、逐次処理ができる
}

# クエリビルダも渡せる
foreach ($db->yieldArray($db->select('very_many_heavy_table')) as $row) {
    // 一気に取得ではなく、逐次処理ができる
}

method ryunosuke\dbml::yieldArray ($sql, $params = []) : ryunosuke\dbml\Generator\Yielder

yield() のレコードの配列版

method ryunosuke\dbml::yieldAssoc ($sql, $params = []) : ryunosuke\dbml\Generator\Yielder

yield() のレコードの連想配列版

method ryunosuke\dbml::yieldLists ($sql, $params = []) : ryunosuke\dbml\Generator\Yielder

yield() のレコード[1列目の配列]

method ryunosuke\dbml::yieldPairs ($sql, $params = []) : ryunosuke\dbml\Generator\Yielder

yield() のレコード[1列目=>2列目]の連想配列

method ryunosuke\dbml\Database::export ($generator, $sql, $params = [], $config = [], $file = null) : int

テーブルレコードをエクスポートする

このメソッドは ryunosuke\dbml\Database::yield() を用いて省メモリで動作するように実装されているので、ある程度巨大な結果セットになるクエリでも実行できる。

このメソッドを直接呼ぶことはほとんど無い。下記の例のように exportXXX 形式で呼び出すことが大半である。

// 標準出力に php 配列を書き出す(全部省略のシンプル版)
$db->exportArray('SELECT * FROM tablename');

// /tmp/tablename.csv に CSV を書き出す(ファイル指定)
$db->exportCsv('SELECT * FROM tablename', [], [
    'bom'       => false,
    'encoding'  => 'SJIS_win',
], '/tmp/tablename.csv');

// 標準出力に JSON を書き出す(クエリビルダで親子関係を指定)
$db->exportJson($db->select('t_parent/t_child'), [], [
    'assoc'  => false,
    'option' => JSON_UNESCAPED_UNICODE,
], null);

method ryunosuke\dbml::exportArray ($sql, $params = [], $config = [], $file = null) : int

export() の ARRAY 版

method ryunosuke\dbml::exportCsv ($sql, $params = [], $config = [], $file = null) : int

export() の CSV 版

method ryunosuke\dbml::exportJson ($sql, $params = [], $config = [], $file = null) : int

export() の JSON 版

method ryunosuke\dbml\Database::gather ($tablename, $wheres = [], $other_wheres = [], $parentive = false) : array

レコード情報をかき集める

特定のレコードと関連したレコードを再帰的に処理して主キーの配列で返す。
運用的な使用ではなく、保守的な使用を想定(運用でも使えなくはないが、おそらく速度的に実用に耐えない)。

# t_article: 1 に関連するレコードをざっくりと返す(t_article -> t_comment -> t_comment_file のようなリレーションの場合)
$db->gather('t_article', ['article_id' => 1]);
// results:
[
    't_article' => [
        ['article_id' => 1],
    ],
    't_comment' => [
        ['comment_id' => 1, 'article_id' => 1],
        ['comment_id' => 2, 'article_id' => 1],
    ],
    't_comment_file' => [
        ['file_id' => 1, 'comment_id' => 1],
        ['file_id' => 2, 'comment_id' => 1],
        ['file_id' => 3, 'comment_id' => 2],
    ],
];

# $other_wheres で他のテーブルの条件が指定できる
$db->gather('t_article', ['article_id' => 1], [
    't_comment'      => ['comment_id' => 2],
    't_comment_file' => '0',
]);
// results:
[
    't_article' => [
        ['article_id' => 1],
    ],
    't_comment' => [
        ['comment_id' => 2, 'article_id' => 1],
    ],
];

# $parentive: true で親方向に辿れる
$db->gather('t_comment_file', ['file_id' => 1], [], true);
// results:
[
    't_comment_file' => [
        ['file_id' => 1, 'comment_id' => 1],
    ],
    't_comment' => [
        ['comment_id' => 1, 'article_id' => 1],
    ],
    't_article' => [
        ['article_id' => 1],
    ],
];

method ryunosuke\dbml\Database::prepare ($sql, $params = []) : ryunosuke\dbml\Query\Statement

prepare されたステートメントを取得する

ほぼ内部メソッドであり、実際は下記のように暗黙のうちに使用され、明示的に呼び出す必要はあまりない。

# プリペアドステートメントを実行する
// UPDATE
// prepare した地点で疑問符パラメータである name は固定される
$stmt = $db->prepare('UPDATE t_table SET name = ? WHERE id = :id', ['hoge']);
// あとから id パラメータを与えて実行することができる
$stmt->executeUpdate(['id' => 1]); // UPDATE t_table SET name = 'hoge' WHERE id = 1
$stmt->executeUpdate(['id' => 2]); // UPDATE t_table SET name = 'hoge' WHERE id = 2

// SELECT
// 得られた Statement は fetchXXX に与えることができる
$stmt = $db->prepare('SELECT * FROM t_table WHERE id = :id');
$db->fetchTuple($stmt, ['id' => 1]); // SELECT * FROM t_table WHERE id = 1
$db->fetchTuple($stmt, ['id' => 2]); // SELECT * FROM t_table WHERE id = 2

# 実際は DML のプロキシメソッドがあるのでそっちを使うことが多い(":id" のような省略記法を使っている。詳細は Statement の方を参照)
// SELECT
$stmt = $db->prepareSelect('t_table', ':id');
$db->fetchTuple($stmt, ['id' => 1]); // SELECT * FROM t_table WHERE id = 1
$db->fetchTuple($stmt, ['id' => 2]); // SELECT * FROM t_table WHERE id = 2
// INSERT
$stmt = $db->prepareInsert('t_table', [':id', ':name']);
$stmt->executeUpdate(['id' => 101, 'name' => 'hoge']);
$stmt->executeUpdate(['id' => 102, 'name' => 'fuga']);
// UPDATE
$stmt = $db->prepareUpdate('t_table', [':name'], [':id']);
$stmt->executeUpdate(['id' => 101, 'name' => 'HOGE']);
$stmt->executeUpdate(['id' => 102, 'name' => 'FUGA']);
// DELETE
$stmt = $db->prepareDelete('t_table', [':id']);
$stmt->executeUpdate(['id' => 101]);
$stmt->executeUpdate(['id' => 102]);

method ryunosuke\dbml::prepareSelect ($tableDescriptor, $where = [], $orderBy = [], $limit = [], $groupBy = [], $having = []) : ryunosuke\dbml\Query\Statement

クエリビルダ構文で SELECT 用プリペアドステートメント取得する(prepare(), select() も参照)

method ryunosuke\dbml::prepareInsert ($tableName, $data) : ryunosuke\dbml\Query\Statement

クエリビルダ構文で INSERT 用プリペアドステートメント取得する(prepare(), insert() も参照)

method ryunosuke\dbml::prepareUpdate ($tableName, $data, $identifier = []) : ryunosuke\dbml\Query\Statement

クエリビルダ構文で UPDATE 用プリペアドステートメント取得する(prepare(), update() も参照)

method ryunosuke\dbml::prepareDelete ($tableName, $identifier = []) : ryunosuke\dbml\Query\Statement

クエリビルダ構文で DELETE 用プリペアドステートメント取得する(prepare(), delete() も参照)

method ryunosuke\dbml::prepareModify ($tableName, $insertData, $updateData = []) : ryunosuke\dbml\Query\Statement

クエリビルダ構文で MODIFY 用プリペアドステートメント取得する(prepare(), modify() も参照)

method ryunosuke\dbml::prepareReplace ($tableName, $data) : ryunosuke\dbml\Query\Statement

クエリビルダ構文で REPLACE 用プリペアドステートメント取得する(prepare(), replace() も参照)

method ryunosuke\dbml\Database::executeQuery ($query, $params = []) : Doctrine\DBAL\Driver\ResultStatement

取得系クエリを実行する

method ryunosuke\dbml\Database::executeUpdate ($query, $params = []) : int

更新系クエリを実行する

method ryunosuke\dbml\Database::dryrun () : ryunosuke\dbml\Database

dryrun モードへ移行する

このメソッドを呼んだ直後は、更新系メソッドが実際には実行せずに実行されるクエリを返すようになる。
後述する insertArray/updateArray などでクエリを取得したいときやテスト・確認などで便利。

このメソッドは setOption を利用した ryunosuke\dbml\Database::context() メソッドで実装されている。つまり

などと実質的にはほとんど同じ(後者に至っては全く同じ=移譲・糖衣構文)。
ryunosuke\dbml\Database::context() で実装されているということは下記のような処理が可能になる。

$db->dryrun()->update('t_table', $data, $where);
// ↑の文を抜けると dryrun モードは解除されている

$db->dryrun();
$db->update('t_table', $data, $where);
// 逆に言うとこのようなことはできない(dryrun モードになった直後にコンテキストが破棄され、元に戻っている)

$db->dryrun()->t_table->update($data, $where);
// ただし、Gateway で dryrun したくてもこれは出来ない。 `->t_table` の時点で GC が実行され、 `->update` 実行時点では何も変わらなくなっているため

$db->t_table->dryrun()->update($data, $where);
// Gateway で使いたい場合はこのように Gateway クラスに dryrun が生えているのでそれを使用する

method ryunosuke\dbml\Database::getEmptyRecord ($tablename, $default = []) : arrayryunosuke\dbml\Entity\Entityable

空のレコードを返す

各カラムはテーブル定義のデフォルト値が格納される(それ以外はすべて null)。
ただし、引数で渡した $default 配列が優先される。

$tablename がエンティティ名の場合はエンティティインスタンスで返す。

# 配列で返す
$array = $db->getEmptyRecord('t_article');

# エンティティで返す
$entity = $db->getEmptyRecord('Article');

method ryunosuke\dbml\Database::import ($datatree) : int

ツリー構造の配列を一括で取り込む

ツリー配列を水平的に走査して ryunosuke\dbml\Database::changeArray() でまとめて更新する。
親・子・孫のような多階層でも動作する。
外部キーで親のカラムを参照している場合、指定配列に含まれていなくても自動的に追加される。

# t_ancestor に紐づく t_parent に紐づく t_child を一気に追加する
$db->import([
    't_ancestor' => [
        [
            'ancestor_name' => '祖先名',
            't_parent' => [
                [
                    'parent_name' => '親名',
                    't_child' => [
                        [
                            'child_name' => '子供名1',
                        ],
                    ],
                ],
            ],
        ],
    ],
]);
// INSERT INTO t_ancestor (ancestor_id, ancestor_name) VALUES (1, "祖先名") ON DUPLICATE KEY UPDATE ancestor_id = VALUES(ancestor_id), ancestor_name = VALUES(ancestor_name)
// INSERT INTO t_parent (parent_id, parent_name, ancestor_id) VALUES (1, "親名", 1) ON DUPLICATE KEY UPDATE parent_id = VALUES(parent_id), parent_name = VALUES(parent_name), ancestor_id = VALUES(ancestor_id)
// INSERT INTO t_child (child_id, child_name, parent_id) VALUES (1, "子供名1", 1) ON DUPLICATE KEY UPDATE child_id = VALUES(child_id), child_name = VALUES(child_name), parent_id = VALUES(parent_id)
// 必要に応じて DELETE も行われる

method ryunosuke\dbml\Database::loadCsv ($tableName, $filename, $options = []) : intstringstring[]ryunosuke\dbml\Query\Statement

CSV を取り込む

CSV の各フィールドをテーブルカラムとしてインポートする。
mysql だけは native:true を指定することで LOAD DATA INFILE による高速なロードが可能。
他の RDBMS はアプリでエミュレーションする。

$options の詳細は下記。

namedefault説明
nativefalseRDBMS ネイティブの機能を使うか(mysql 専用)
encodingmb_internal_encoding取り込むファイルのエンコーディング
skip0読み飛ばす行(ヘッダ読み飛ばしのために1を指定することが多い)
delimiter','デリミタ文字(fgetcsv の第2引数)
enclosure'"'囲いこみ文字(fgetcsv の第3引数)
escape'\'エスケープ文字(fgetcsv の第4引数)
eol"\n"行終端文字(native:true 時のみ有効)
chunknull一度に実行するレコード数(native:false 時のみ有効)
var_prefix''mysql 変数のプレフィックス(native:true 時のみ有効だが気にしなくていい)

native は非常に高速だが、制約も留意点も多い。
非 native は汎用性があるが、ただの INSERT の羅列になるので速度的なメリットはない。

$table は要素1の配列でも与えられる。その場合キーがテーブル名、値が取り込むカラム(配列)となる。
配列でない場合(単純にテーブル名だけを与えた場合)は CSV 列とテーブル定義順が同じとみなしてすべて取り込む。
少々ややこしいので下記の使用例を参照。

# テーブル定義は t_hoge {id: int, name: string, data: blob, flg: tinyint} とする

# CSV: "1,hoge,data,0" を取り込む例(テーブル定義と CSV が一致している最も単純な例)
$db->loadCsv('t_hoge', $csvfile);
// results: ['id' => 1, 'name' => 'hoge', 'data' => 'data', 'flg' => 0];

# CSV: "hoge,0" を取り込む例(CSV に一部しか含まれていない例)
$db->loadCsv([
    // このように [テーブル名 => カラム] の配列で指定する
    't_hoge' => [
        // 原則としてこの配列の並び順と CSV の並び順がマップされる
        'name', // CSV 第1列
        'flg',  // CSV 第2列
        // それ以降(CSV 列からはみ出す分)は他のカラムとして直値を与えることができる
        'id'   => 1,
        'data' => null,
    ],
], $csvfile);
// results: ['id' => 1, 'name' => 'hoge', 'data' => null, 'flg' => 0];

# CSV: "1,hoge,dummy,0" を取り込む例(CSV に取り込みたくない列が含まれている例)
$db->loadCsv([
    't_hoge' => [
        'id',   // CSV 第1列
        'name', // CSV 第2列
        null,   // CSV 第3列。このように null を指定するとその列を読み飛ばすことができる
        'flg',  // CSV 第4列
    ],
], $csvfile);
// results: ['id' => 1, 'name' => 'hoge', 'data' => null, 'flg' => 0];

# CSV: "1,hoge" を HOGE として取り込む例(SQL 関数やクロージャを経由して取り込む例)
$db->loadCsv([
    't_hoge' => [
        'id',
        // 値に ? で列値を参照できる式を渡すことができる(この場合キーがカラム名指定になる)
        'name' => new Expression('UPPER(?)'),
        // 「php レイヤ」という点以外は↑と同じ(CSV 値が引数で渡ってくる)
        'name' => function ($v) { return strtoupper($v); },
    ],
], $csvfile);
// results: ['id' => 1, 'name' => 'HOGE', 'data' => null];

mysql の native はクロージャが使えなかったり、null の扱いがアレだったり eol に注意したりと細かな点は異なるが原則的には同じ(サンプルは省略)。
ただし、 PDO に PDO::MYSQL_ATTR_LOCAL_INFILE: true を与えないと動作しないのでそれだけは注意。

method ryunosuke\dbml\Database::insertSelect ($tableName, $sql, $columns = [], $params = []) : intstringryunosuke\dbml\Query\Statement

INSERT INTO SELECT 構文

# 生クエリで INSERT INTO SELECT
$db->insertSelect('t_destination', 'SELECT * FROM t_source');
// INSERT INTO t_destination SELECT * FROM t_source

# $columns を指定すると INSERT カラムを指定できる
$db->insertSelect('t_destination', 'SELECT * FROM t_source', ['id', 'name', 'content']);
// INSERT INTO t_destination (id, name, content) SELECT * FROM t_source

# クエリビルダも渡せる
$db->insertSelect('t_destination', $db->select('t_source'));
// INSERT INTO t_destination SELECT * FROM t_source

method ryunosuke\dbml\Database::insertArray ($tableName, $data, $chunk = 0) : intstringstring[]ryunosuke\dbml\Query\Statement

BULK INSERT 構文

BULK INSERT の仕様上、与えるカラム配列はキーが統一されていなければならない。

$db->insertArray('t_table', [
    [
        'colA' => '1',                       // [カラム => 値] 形式
        'colB' => $db->raw('UPEER(?)', 'b'), // [カラム => Expression] 形式
    ],
    [
        'colA' => '2',
        'colB' => $db->raw('UPEER(?)', 'b'),
    ],
]);
// INSERT INTO t_table (colA, colB) VALUES ('1', UPPER('b')), ('2', UPPER('b'))

method ryunosuke\dbml\Database::updateArray ($tableName, $data, $identifier = []) : intstringstring[]ryunosuke\dbml\Query\Statement

BULK UPDATE 構文

指定配列でバルクアップデートする。
$data の引数配列には必ず主キーを含める必要がある。

# (id = 1,2,3) の行がそれぞれ与えられたデータに UPDATE される
$db->updateArray('tablename', [
    ['id' => 1, 'name' => 'hoge'],
    ['id' => 2, 'data' => 'FUGA'],
    ['id' => 3, 'name' => 'piyo', 'data' => 'PIYO'],
], ['status_cd' => 50]);
// UPDATE tablename SET
//   name = CASE id WHEN '1' THEN 'hoge' WHEN '3' THEN 'piyo' ELSE name END,
//   data = CASE id WHEN '2' THEN 'FUGA' WHEN '3' THEN 'PIYO' ELSE data END
// WHERE (status_cd = '50') AND (id IN ('1','2','3'))

あくまで UPDATE であり、存在しない行には関与しない。

$data の引数配列に含めた主キーは WHERE 句に必ず追加される。
したがって $identifier を指定するのは「status_cd = 50 のもののみ」などといった「前提となるような条件」を書く。

method ryunosuke\dbml\Database::modifyArray ($tableName, $insertData, $updateData = [], $chunk = 0) : intstringstring[]ryunosuke\dbml\Query\Statement

BULK UPSERT 構文

指定配列でバルクアップサートする(MySQL のみサポート)

$insertData だけを指定した場合は「与えられた配列を modify する」という直感的な動作になる。
更新は行われないので実質的に「重複を無視した挿入」のように振舞う。

$updateData を指定すると存在する場合にその値が使用される。 行ごとではなく一律であることに注意。
なので $updateData はレコードの配列ではなく [key => value] のシンプルな配列を与える。

# 存在する行は (name = XXX) になり、追加される行は (name = hoge,fuga,piyo) になる
$db->modifyArray('tablename', [
    ['id' => 1, 'name' => 'hoge'],
    ['id' => 2, 'name' => 'fuga'],
    ['id' => 3, 'name' => 'piyo'],
], ['name' => 'XXX']);
// INSERT INTO tablename (id, name) VALUES
//   ('1', 'hoge'),
//   ('2', 'fuga'),
//   ('3', 'piyo')
// ON DUPLICATE KEY UPDATE
//   name = 'XXX'

# $updateData を指定しなければ VALUES(col) になる(≒変更されない)
$db->modifyArray('tablename', [
    ['id' => 1, 'name' => 'hoge'],
    ['id' => 2, 'name' => 'fuga'],
    ['id' => 3, 'name' => 'piyo'],
]);
// INSERT INTO tablename (id, name) VALUES
//   ('1', 'hoge'),
//   ('2', 'fuga'),
//   ('3', 'piyo')
// ON DUPLICATE KEY UPDATE
//   id = VALUES(id),
//   name = VALUES(name)

method ryunosuke\dbml\Database::changeArray ($tableName, $dataarray, $identifier) : array

INSERT+UPDATE+DELETE を同時に行う

テーブル状態を指定した配列・条件に「持っていく」メソッドとも言える。

このメソッドは複数のステートメントが実行され、 dryrun や prepare を使うことが出来ない。
また、可能な限りクエリを少なくかつ効率的に実行されるように構築されるので、テーブル定義や与えたデータによってはまったく構成の異なるクエリになる可能性がある(結果は同じになるが)。
具体的には

という動作になる。つまり実質的にはほぼ mysql 専用で、他の DBMS では動きをなんとかして模倣しているだけに過ぎない。

# `['category' => 'misc']` の世界でレコードが3行になる。指定した3行が無ければ作成され、有るなら更新され、id 指定している 1,2,3 以外のレコードは削除される
$db->changeArray('table_name', [
    ['id' => 1, 'name' => 'hoge'],
    ['id' => 2, 'name' => 'fuga'],
    ['id' => 3, 'name' => 'piyo'],
], ['category' => 'misc']);
// mysql の場合
// INSERT INTO table_name (id, name) VALUES
//   ('1', 'hoge'),
//   ('2', 'fuga'),
//   ('3', 'piyo')
// ON DUPLICATE KEY UPDATE
//   id = VALUES(id),
//   name = VALUES(name)
// DELETE FROM table_name WHERE (category = 'misc') AND (NOT (id IN ('1', '2', '3')))
//
// mysql 以外の場合
// SELECT EXISTS (SELECT * FROM table_name WHERE id = '1')
// UPDATE table_name SET name = 'hoge' WHERE id = '1'
// SELECT EXISTS (SELECT * FROM table_name WHERE id = '2')
// UPDATE table_name SET name = 'fuga' WHERE id = '2'
// SELECT EXISTS (SELECT * FROM table_name WHERE id = '3')
// INSERT INTO table_name (id, name) VALUES ('3', 'piyo')
// DELETE FROM table_name WHERE (category = 'misc') AND (NOT (id IN ('1', '2', '3')))

method ryunosuke\dbml\Database::insert ($tableName, $data) : intstringarrayryunosuke\dbml\Query\Statement

INSERT 構文

# シンプルに1行 INSERT
$db->insert('tablename', [
    'id'   => 1,
    'name' => 'hoge',
]);
// INSERT INTO tablename (id, name) VALUES ('1', 'hoge')

# 特殊構文としてカラムとデータを別に与えられる
$db->insert('tablename.name', 'hoge');
// INSERT INTO tablename (name) VALUES ('hoge')
$db->insert('tablename.id, name', ['1', 'hoge']);
// INSERT INTO tablename (id, name) VALUES ('1', 'hoge')

# TableDescriptor 的値や QueryBuilder を渡すと複数テーブルへ INSERT できる
// この用途は「垂直分割したテーブルへの INSERT」である(主キーを混ぜてくれるので小細工をする必要がない)。
$db->insert('t_article + t_article_misc', [
    'title'     => 'article_title', // t_article 側のデータ
    'misc_data' => 'misc_data',     // t_article_misc 側のデータ
]);
// INSERT INTO t_article (title) VALUES ('article_title')
// INSERT INTO t_article_misc (id, misc_data) VALUES ('1', 'misc_data')

# 複数テーブルへ INSERT は配列でも表現できる
$db->insert([
    't_article' => [
        'title' => 'article_title',
    ],
    '+t_article_misc' => [
        'misc_data' => 'misc_data',
    ],
], []);
// INSERT INTO t_article (title) VALUES ('article_title')
// INSERT INTO t_article_misc (id, misc_data) VALUES ('1', 'misc_data')

method ryunosuke\dbml::insertOrThrow ($tableName, $data) : array

insert() の例外送出版

method ryunosuke\dbml::insertIgnore ($tableName, $data) : array

IGNORE 付き insert()

method ryunosuke\dbml::insertConditionally ($tableName, $condition, $data) : array

条件付き insert()

$condition が WHERE 的判定され、合致しないときは insert が行われない。
$condition が配列の場合は $tableName で selectNotExists する。つまり「存在しないとき実行」となる。

実行したら主キー配列を返し、されなかったら空配列を返す。

method ryunosuke\dbml\Database::update ($tableName, $data, $identifier = []) : intstringarrayryunosuke\dbml\Query\Statement

UPDATE 構文

# シンプルに1行 UPDATE
$db->update('tablename', [
    'name' => 'hoge',
], ['id' => 1]);
// UPDATE tablename SET name = 'hoge' WHERE id = '1'

# 特殊構文としてカラムとデータを別に与えられる
$db->update('tablename.name', 'hoge', ['id' => 1]);
// UPDATE tablename SET name = 'hoge' WHERE id = '1'

# TableDescriptor 的値や QueryBuilder を渡すと UPDATE JOIN になる(多分 mysql でしか動かない)
$db->update('t_article + t_comment', [
    'title'   => 'hoge',
    'comment' => 'fuga',
]);
// UPDATE t_article INNER JOIN t_comment ON t_comment.article_id = t_article.article_id SET title = "hoge", comment = "fuga"

# UPDATE JOIN は配列でも表現できる(やはり mysql のみ)
$db->update([
    't_article' => [
        'title' => 'hoge',
    ],
    '+t_comment' => [
        'comment' => 'fuga',
    ],
], []);
// UPDATE t_article A INNER JOIN t_comment C ON C.article_id = A.article_id SET A.title = 'hoge', C.comment = 'fuga'

method ryunosuke\dbml::updateOrThrow ($tableName, $data, $identifier = []) : array

update() の例外送出版

method ryunosuke\dbml::updateIgnore ($tableName, $data, $identifier = []) : array

IGNORE 付き update()

method ryunosuke\dbml\Database::delete ($tableName, $identifier = []) : intstringarrayryunosuke\dbml\Query\Statement

DELETE 構文

# シンプルに1行 DELETE
$db->delete('tablename', ['id' => 1]);
// DELETE FROM tablename WHERE id = '1'

# TableDescriptor 的値や QueryBuilder を渡すと DELETE JOIN になる(多分 mysql でしか動かない)
$db->delete('t_article + t_comment', [
    't_article.article_id' => 1,
]);
// DELETE t_article FROM t_article INNER JOIN t_comment ON t_comment.article_id = t_article.article_id WHERE t_article.article_id = 1

method ryunosuke\dbml::deleteOrThrow ($tableName, $identifier = []) : array

delete() の例外送出版

method ryunosuke\dbml::deleteIgnore ($tableName, $identifier = []) : array

IGNORE 付き delete()

method ryunosuke\dbml\Database::remove ($tableName, $identifier = []) : intstringarrayryunosuke\dbml\Query\Statement

DELETE 構文(RESTRICT/NO ACTION を除外)

CASCADE/SET NULL はむしろ「消えて欲しい/NULL になって欲しい」状況だと考えられるので何も手を加えない。
簡単に言えば「外部キーエラーにならないような」 DELETE を実行する。

# childtable -> parenttable に RESTRICT な外部キーがある場合
$db->remove('parenttable', ['id' => 1]);
// DELETE FROM parenttable WHERE id = '1' AND (NOT EXISTS (SELECT * FROM childtable WHERE parenttable.id = childtable.parent_id))

method ryunosuke\dbml::removeOrThrow ($tableName, $identifier = []) : array

remove() の例外送出版

method ryunosuke\dbml::removeIgnore ($tableName, $identifier = []) : array

IGNORE 付き remove()

method ryunosuke\dbml\Database::destroy ($tableName, $identifier = []) : intstring[]

DELETE 構文(RESTRICT/NO ACTION も削除)

RESTRICT/NO ACTION な子テーブルレコードを先に削除してから実行する。
簡単に言えば「外部キーエラーにならないようにしてから」 DELETE を実行する。

実質的には RESTRICT/NO ACTION を無視して CASCADE 的な動作と同等なので注意して使用すべき。
(RESTRICT/NO ACTION にしているのには必ず理由があるはず)。

相互参照外部キーでかつそれらが共に「RESTRICT/NO ACTION」だと無限ループになるので注意。
(そのような外部キーはおかしいと思うので特にチェックしない)。

さらに、複合カラム外部キーだと行値式 IN を使うので SQLServer では実行できない。また、 mysql 5.6 以下ではインデックスが効かないので注意。
単一カラム外部キーなら問題ない。

# childtable -> parenttable に RESTRICT な外部キーがある場合
$db->destroy('parenttable', ['status' => 'deleted']);
// DELETE FROM childtable WHERE (cid) IN (parenttable id FROM parenttable WHERE status = 'deleted')
// DELETE FROM parenttable WHERE status = 'deleted'

method ryunosuke\dbml::destroyOrThrow ($tableName, $identifier = []) : array

destroy() の例外送出版

method ryunosuke\dbml::destroyIgnore ($tableName, $identifier = []) : array

IGNORE 付き destroy()

method ryunosuke\dbml\Database::reduce ($tableName, $limit = null, $orderBy = [], $groupBy = [], $identifier = []) : intstring

DELETE 構文(指定件数を残して削除)

$orderBy の順番で $limit 件残すように DELETE を発行する。
$groupBy を指定するとそのグルーピングの世界で $limit 件残すようにそれぞれ削除する。
条件を指定した場合や同値が存在した場合、指定件数より残ることがあるが、少なくなることはない。

$orderBy は単一しか対応していない(大抵の場合は日付的なカラムの単一指定のはず)。
"+column" のように + を付与すると昇順、 "-column" のように - を付与すると降順になる(未指定時は昇順)。
一応 ['column' => true] のような orderBy 指定にも対応している。

削除には行値式 IN を使うので SQLServer では実行できない。また、 mysql 5.6 以下ではインデックスが効かないので注意。
単一主キーなら問題ない。

# logs テーブルから log_time の降順で 10 件残して削除
$db->reduce('logs', 10, '-log_time');

# logs テーブルから log_time の降順でカテゴリごとに 10 件残して削除
$db->reduce('logs', 10, '-log_time', ['category']);

# logs テーブルから log_time の降順でカテゴリごとに 10 件残して削除するが直近1ヶ月は残す(1ヶ月以上前を削除対象とする)
$db->reduce('logs', 10, '-log_time', ['category'], ['log_time < ?' => date('Y-m-d', strtotime('now -1 month'))]);

method ryunosuke\dbml::reduceOrThrow ($tableName, $limit = null, $orderBy = [], $groupBy = [], $identifier = []) : array

reduce() の例外送出版

method ryunosuke\dbml\Database::upsert ($tableName, $insertData, $updateData = []) : intarray

行が無かったら INSERT、有ったら UPDATE

アプリレイヤーで SELECT EXISTS(排他ロック) で行を確認し、無ければ INSERT 有れば UPDATE する。
RDBMS に依存せず癖が少ない行置換メソッドであるが、 mysql ではギャップロック同士が競合せず deadlock になるケースが極稀に存在する。

OrThrow 版の戻り値は「本当に更新した主キー配列」になる。
下記のパターンがある。

言い換えれば「更新したその行にアクセスするに足る主キー配列」を返す。

# id 的列が指定されていないかつ AUTOINCREMENT の場合は INSERT 確定となる
$db->upsert('tablename', ['name' => 'hoge']);
// INSERT INTO tablename (name) VALUES ('piyo') -- 連番は AUTOINCREMENT

# id 的列が指定されているか AUTOINCREMENT でない場合は SELECT EXISTS でチェックする
$db->upsert('tablename', ['id' => 1, 'name' => 'hoge']);
// SELECT EXISTS (SELECT * FROM tablename WHERE id = '1')
//   存在しない: INSERT INTO tablename (id, name) VALUES ('1', 'hoge')
//   存在する:   UPDATE tablename SET name = 'hoge' WHERE id = '1'

method ryunosuke\dbml::upsertOrThrow ($tableName, $insertData, $updateData = []) : array

upsert() の例外送出版

method ryunosuke\dbml::upsertConditionally ($tableName, $condition, $insertData, $updateData = []) : array

条件付き upsert()

$condition が WHERE 的判定され、合致しないときは upsert が行われない。
$condition が配列の場合は $tableName で selectNotExists する。つまり「存在しないとき実行」となる。

実行したら主キー配列を返し、されなかったら空配列を返す。

method ryunosuke\dbml\Database::modify ($tableName, $insertData, $updateData = []) : intarrayryunosuke\dbml\Query\Statement

MERGE 構文

RDBMS で方言・効果がかなり激しい。

# シンプルな INSERT ~ ON DUPLICATE KEY
$db->modify('tablename', [
    'id'   => 1,
    'name' => 'hoge',
]);
// INSERT INTO tablename SET id = '1', name = 'hoge' ON DUPLICATE KEY UPDATE id = VALUES(id), name = VALUES(name)

# $updateData で更新時のデータを指定できる
$db->modify('tablename', [
    'id'   => 1,
    'name' => 'hoge',
], ['name' => 'fuga']);
// INSERT INTO tablename SET id = '1', name = 'hoge' ON DUPLICATE KEY UPDATE name = 'fuga'

method ryunosuke\dbml::modifyOrThrow ($tableName, $insertData, $updateData = []) : array

modify() の例外送出版

method ryunosuke\dbml::modifyIgnore ($tableName, $insertData, $updateData = []) : array

IGNORE 付き modify()

method ryunosuke\dbml::modifyConditionally ($tableName, $condition, $insertData, $updateData = []) : array

条件付き modify()

$condition が WHERE 的判定され、合致しないときは modify が行われない。
$condition が配列の場合は $tableName で selectNotExists する。つまり「存在しないとき実行」となる。

実行したら主キー配列を返し、されなかったら空配列を返す。

method ryunosuke\dbml\Database::replace ($tableName, $data) : intarrayryunosuke\dbml\Query\Statement

REPLACE 構文

標準のよくある REPLACE とは違って、元のカラム値は維持される。
ただし、REPLACE であることに変わりはないので DELETE -> INSERT されるため外部キー(特に CASCADE DELETE) に注意。

# シンプルな REPLACE
$db->replace('tablename', [
    'id'   => 1,
    'name' => 'hoge',
]);
// REPLACE INTO tablename (id, name, othercolumn) SELECT '1', 'hoge', othercolumn FROM (SELECT NULL) __T LEFT JOIN tablename ON id = '1'

method ryunosuke\dbml::replaceOrThrow ($tableName, $data) : array

replace() の例外送出版

method ryunosuke\dbml\Database::duplicate ($targetTable, $overrideData = [], $where = [], $sourceTable = null) : intryunosuke\dbml\Query\Statement

行を複製する

# 最もシンプルな例。単純に tablename のレコードが2倍になる(主キーが重複してしまうので AUTOINCREMENT の場合のみ)
$db->duplicate('tablename');
// INSERT INTO tablename (name, other_columns) SELECT name AS name, other_columns AS other_columns FROM tablename

# 複製データと条件を指定して複製
$db->duplicate('tablename', [
    'name' => 'copied',
], ['id' => 1]);
// INSERT INTO tablename (name, other_columns) SELECT 'copied' AS name, other_columns AS other_columns FROM tablename WHERE id = '1'

method ryunosuke\dbml\Database::truncate ($tableName, $cascade = false) : int

TRUNCATE 構文

$db->truncate('tablename');
// TRUNCATE tablename

method ryunosuke\dbml\Database::getLastInsertId ($tableName = null, $columnName = null) : nullstring

最後に挿入した ID を返す

method ryunosuke\dbml\Database::resetAutoIncrement ($tableName, $seq = 1) : void

自動採番列をリセットする

method ryunosuke\dbml::getInsertSet () : bool

method ryunosuke\dbml::setInsertSet ($bool) : ryunosuke\dbml\Database

method ryunosuke\dbml::getFilterNoExistsColumn () : bool

method ryunosuke\dbml::setFilterNoExistsColumn ($bool) : ryunosuke\dbml\Database

存在しないカラムをフィルタするか指定する

この設定を true にすると INSERT/UPDATE 時に「対象テーブルに存在しないカラム」が自動で伏せられるようになる。
余計なキーが有るだけでエラーになるのは多くの場合めんどくさいだけなので true にするのは有用。

ただし、スペルミスなどでキーの指定を誤ると何も言わずに伏せてしまうので気づきにくい不具合になるので注意。

なお、デフォルトは true。

method ryunosuke\dbml::getConvertEmptyToNull () : bool

method ryunosuke\dbml::setConvertEmptyToNull ($bool) : ryunosuke\dbml\Database

NULLABLE に空文字が来たときの挙動を指定する

この設定を true にすると、例えば hoge_no: INTEGER NOT NULL なカラムに空文字を与えて INSERT/UPDATE した場合に自動で NULL に変換されるようになる。
Web システムにおいては空文字でパラメータが来ることが多いのでこれを true にしておくといちいち変換せずに済む。

よくあるのは「年齢」というカラムがあり、入力画面で必須ではない場合。
未入力で空文字が飛んでくるので、設定にもよるがそのまま mysql に突っ込んでしまうと 0 になるかエラーになる。
これはそういったケースで楽をするための設定。

なお、デフォルトは true。

method ryunosuke\dbml::getYamlParser () : callable

method ryunosuke\dbml::setYamlParser ($callable) : ryunosuke\dbml\Database

method ryunosuke\dbml::getAutoCastType () : array

method ryunosuke\dbml::getInjectCallStack () : string

method ryunosuke\dbml::setInjectCallStack ($string) : ryunosuke\dbml\Database

method ryunosuke\dbml::getMasterMode () : bool

method ryunosuke\dbml::setMasterMode ($bool) : ryunosuke\dbml\Database

method ryunosuke\dbml::getCheckSameColumn () : string

method ryunosuke\dbml::setCheckSameColumn ($string) : ryunosuke\dbml\Database

同名カラムをどのように扱うか設定する

指定説明
null同名カラムに対して何もしない。PDO のデフォルトの挙動(後ろ優先)となる
"noallow"同名カラムを検出したら即座に例外を投げるようになる
"strict"同名カラムを検出したら値を確認し、全て同一値ならその値をカラム値とする。一つでも異なる値がある場合は例外を投げる
"loose"↑と同じだが、比較は緩く行われる(文字列比較)。更に null は除外してチェックする

普通に PDO を使う分には SELECT 句の後ろにあるほど優先されて返ってくる(仕様で規約されているかは知らん)。
それはそれで便利なんだが、例えばよくありそうな name カラムがある2つのテーブルを JOIN すると意図しない結果になることが多々ある。

$db->fetchArray('select t_article.*, t_user.* from t_article join t_user using (user_id)');

このクエリは t_user.namet_article.name というカラムが存在すると破綻する。大抵の場合は t_user.name が返ってくるが明確に意図した結果ではない。
このオプションを指定するとそういった状況を抑止することができる。

ただし、このオプションはフェッチ結果の全行全列を確認する必要があるため猛烈に遅い
基本的には開発時に指定し、本運用環境では null を指定しておくと良い。

ただ開発時でも、 "noallow" の使用はおすすめできない。
例えば↑のクエリは user_id で using しているように、name 以外に user_id カラムも重複している。したがって "noallow" を指定すると例外が飛ぶことになる。
往々にして主キーと外部キーは同名になることが多いので、 "noallow" を指定しても実質的には使い物にならない。

これを避けるのが "strict" で、これを指定すると同名カラムの値が同値であればセーフとみなす。つまり動作に影響を与えずある程度良い感じにチェックしてくれるようになる。
さらに "loose" を指定すると NULL を除外して重複チェックする。これは LEFT JOIN 時に効果を発揮する(LEFT 時は他方が NULL になることがよくあるため)。
"loose" は文字列による緩い比較になってしまうが、型が異なる状況はそこまで多くないはず。

なお、フェッチ値のチェックであり、クエリレベルでは何もしないことに注意。
例えば↑のクエリで "strict" のとき「たまたま t_user.namet_article.name が同じ値だった」ケースは検出できない。また、「そもそもフェッチ行が0だった」場合も検出できない。
このオプションはあくまで開発をサポートする機能という位置づけである。

method ryunosuke\dbml::getAnywhereOption () : array

method ryunosuke\dbml::setAnywhereOption ($array) : ryunosuke\dbml\Database

method ryunosuke\dbml::getExportClass () : array

method ryunosuke\dbml::setExportClass ($array) : ryunosuke\dbml\Database

method ryunosuke\dbml::getDefaultIteration () : string

ryunosuke\dbml\Gateway\TableGateway::getDefaultIteration() 参照

method ryunosuke\dbml::setDefaultIteration ($iterationMode) : ryunosuke\dbml\Database

ryunosuke\dbml\Gateway\TableGateway::setDefaultIteration() 参照

method ryunosuke\dbml::getDefaultJoinMethod () : string

ryunosuke\dbml\Gateway\TableGateway::getDefaultJoinMethod() 参照

method ryunosuke\dbml::setDefaultJoinMethod ($string) : ryunosuke\dbml\Database

ryunosuke\dbml\Gateway\TableGateway::setDefaultJoinMethod() 参照

method ryunosuke\dbml::getAutoOrder () : bool

ryunosuke\dbml\Query\QueryBuilder::getAutoOrder() 参照

method ryunosuke\dbml::setAutoOrder ($bool) : ryunosuke\dbml\Database

ryunosuke\dbml\Query\QueryBuilder::setAutoOrder() 参照

method ryunosuke\dbml::getPrimarySeparator () : string

ryunosuke\dbml\Query\QueryBuilder::getPrimarySeparator() 参照

method ryunosuke\dbml::setPrimarySeparator ($string) : ryunosuke\dbml\Database

ryunosuke\dbml\Query\QueryBuilder::setPrimarySeparator() 参照

method ryunosuke\dbml::getAggregationDelimiter () : string

ryunosuke\dbml\Query\QueryBuilder::getAggregationDelimiter() 参照

method ryunosuke\dbml::setAggregationDelimiter ($string) : ryunosuke\dbml\Database

ryunosuke\dbml\Query\QueryBuilder::setAggregationDelimiter() 参照

method ryunosuke\dbml::getPropagateLockMode () : bool

ryunosuke\dbml\Query\QueryBuilder::getPropagateLockMode() 参照

method ryunosuke\dbml::setPropagateLockMode ($bool) : ryunosuke\dbml\Database

ryunosuke\dbml\Query\QueryBuilder::setPropagateLockMode() 参照

method ryunosuke\dbml::getInjectChildColumn () : bool

ryunosuke\dbml\Query\QueryBuilder::getInjectChildColumn() 参照

method ryunosuke\dbml::setInjectChildColumn ($bool) : ryunosuke\dbml\Database

ryunosuke\dbml\Query\QueryBuilder::setInjectChildColumn() 参照